From 0fb2f27cef41d72d349ce2b1029f1e76a183319b Mon Sep 17 00:00:00 2001 From: chengjinyang Date: Wed, 29 Nov 2023 20:10:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(amis-editor):=20api=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=8E=A5=E5=8F=A3=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=BC=B9=E7=AA=97=E4=B8=AD=E5=90=AB=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E7=9A=84query=E7=AD=89=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=9D=E6=AC=A1=E6=B8=B2=E6=9F=93=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-editor/src/renderer/ValidationControl.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/amis-editor/src/renderer/ValidationControl.tsx b/packages/amis-editor/src/renderer/ValidationControl.tsx index 127fde630..65d513fc7 100644 --- a/packages/amis-editor/src/renderer/ValidationControl.tsx +++ b/packages/amis-editor/src/renderer/ValidationControl.tsx @@ -340,7 +340,6 @@ export default class ValidationControl extends React.Component< wrapperComponent: 'div', mode: 'horizontal', data: { - validateApi: this.props.data.validateApi, switchStatus: this.props.data.validateApi !== undefined }, preventEnterSubmit: true, @@ -369,6 +368,10 @@ export default class ValidationControl extends React.Component< className: 'ae-ExtendMore ae-ValidationControl-item-input', bodyClassName: 'w-full', visibleOn: 'this.switchStatus', + data: { + // 放在form中则包含的表达式会被求值 + validateApi: this.props.data.validateApi + }, body: [ getSchemaTpl('apiControl', { name: 'validateApi',