diff --git a/packages/amis-editor/src/renderer/ExpressionFormulaControl.tsx b/packages/amis-editor/src/renderer/ExpressionFormulaControl.tsx index b26b8247b..c7bdb0a22 100644 --- a/packages/amis-editor/src/renderer/ExpressionFormulaControl.tsx +++ b/packages/amis-editor/src/renderer/ExpressionFormulaControl.tsx @@ -27,7 +27,7 @@ interface ExpressionFormulaControlProps extends FormControlProps { */ variableMode?: 'tabs' | 'tree'; /** - * 表达式最外层是否使用 ${} 来包裹,默认 false + * 表达式最外层是否使用 ${} 来包裹,默认 true */ evalMode: boolean; } @@ -45,7 +45,7 @@ export default class ExpressionFormulaControl extends React.Component< static defaultProps: Partial = { variableMode: 'tabs', requiredDataPropsVariables: false, - evalMode: false + evalMode: true }; isUnmount: boolean; diff --git a/packages/amis-editor/src/renderer/StatusControl.tsx b/packages/amis-editor/src/renderer/StatusControl.tsx index dce01fdf7..a59aab619 100644 --- a/packages/amis-editor/src/renderer/StatusControl.tsx +++ b/packages/amis-editor/src/renderer/StatusControl.tsx @@ -181,6 +181,7 @@ export class StatusControl extends React.Component< }, { type: 'ae-expressionFormulaControl', + evalMode: false, label: '表达式', name: 'expression', placeholder: `请输入${label}条件`, diff --git a/packages/amis-editor/src/renderer/event-control/action-config-dialog.tsx b/packages/amis-editor/src/renderer/event-control/action-config-dialog.tsx index fb7bdcc3a..51d82424f 100644 --- a/packages/amis-editor/src/renderer/event-control/action-config-dialog.tsx +++ b/packages/amis-editor/src/renderer/event-control/action-config-dialog.tsx @@ -300,6 +300,7 @@ export default class ActionDialog extends React.Component { name: 'expression', label: '执行条件', type: 'ae-expressionFormulaControl', + evalMode: true, variables: '${variables}', mode: 'horizontal', size: 'lg',