Merge pull request #8950 from chengjinyang0/feat-validation-echo

fix(amis-editor): api中心类型的接口校验设置弹窗中含表达式的query等参数初次渲染不正确
This commit is contained in:
hsm-lv 2023-12-01 13:06:10 +08:00 committed by GitHub
commit 69289b8892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',