amis-saas-5748 [Bug] 组合输入框等旧表单项组件配置面板,隐藏时删除字段配置项无法关闭

Change-Id: Ic056755bd9edaac7ef50408ed19710c7b1ebc0bc
This commit is contained in:
jiatianqi 2022-10-24 10:34:43 +08:00
parent 300959133e
commit acd613ced6

View File

@ -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 ? [] : [
...(!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: '隐藏时删除表单项值'
})
]
},