From acd613ced6a57b76aba5ee00bbf4c5f639300e9f Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Mon, 24 Oct 2022 10:34:43 +0800 Subject: [PATCH] =?UTF-8?q?amis-saas-5748=20[Bug]=20=E7=BB=84=E5=90=88?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=AD=89=E6=97=A7=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E9=A1=B9=E7=BB=84=E4=BB=B6=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E9=9A=90=E8=97=8F=E6=97=B6=E5=88=A0=E9=99=A4=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=85=8D=E7=BD=AE=E9=A1=B9=E6=97=A0=E6=B3=95=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic056755bd9edaac7ef50408ed19710c7b1ebc0bc --- packages/amis-editor/src/plugin/Form/Item.tsx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/amis-editor/src/plugin/Form/Item.tsx b/packages/amis-editor/src/plugin/Form/Item.tsx index d12c362d5..6bfcba1c1 100644 --- a/packages/amis-editor/src/plugin/Form/Item.tsx +++ b/packages/amis-editor/src/plugin/Form/Item.tsx @@ -58,9 +58,7 @@ export class ItemPlugin extends BasePlugin { panelBodyCreator = (context: BaseEventContext) => { const type = context.schema.type || ''; const supportStatic = SUPPORT_STATIC_FORMITEM_CMPTS.includes(type); - const ignoreName = ~['button', 'submit', 'reset'].indexOf( - type - ); + const ignoreName = ~['button', 'submit', 'reset'].indexOf(type); const notRequiredName = ~[ 'button-toobar', 'container', @@ -159,12 +157,14 @@ export class ItemPlugin extends BasePlugin { name: 'descriptionClassName', visibleOn: 'this.description' }), - ...!supportStatic ? [] : [ - getSchemaTpl('className', { - label: '静态 CSS 类名', - name: 'staticClassName' - }) - ] + ...(!supportStatic + ? [] + : [ + getSchemaTpl('className', { + label: '静态 CSS 类名', + name: 'staticClassName' + }) + ]) ] }, @@ -177,8 +177,7 @@ export class ItemPlugin extends BasePlugin { supportStatic ? getSchemaTpl('static') : null, getSchemaTpl('switch', { name: 'clearValueOnHidden', - label: '隐藏时删除表单项值', - disabledOn: 'typeof this.visible === "boolean"' + label: '隐藏时删除表单项值' }) ] },