From 12e17a3d2e039778aaa2a0cbadf81bdcf40f521d Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Tue, 22 Nov 2022 19:04:12 +0800 Subject: [PATCH] =?UTF-8?q?amis-saas-8183=20[Bug]=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=AD=EF=BC=8C=E8=A1=A8=E8=BE=BE=E5=BC=8F?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ided72f1317bf26a65ba2056555b53f1842d9c881 --- .../amis-editor/src/renderer/ExpressionFormulaControl.tsx | 4 ++-- packages/amis-editor/src/renderer/StatusControl.tsx | 1 + .../src/renderer/event-control/action-config-dialog.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) 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',