mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
amis-saas-5748 [Bug] 组合输入框等旧表单项组件配置面板,隐藏时删除字段配置项无法关闭
Change-Id: Ic056755bd9edaac7ef50408ed19710c7b1ebc0bc
This commit is contained in:
parent
300959133e
commit
acd613ced6
@ -58,9 +58,7 @@ export class ItemPlugin extends BasePlugin {
|
|||||||
panelBodyCreator = (context: BaseEventContext) => {
|
panelBodyCreator = (context: BaseEventContext) => {
|
||||||
const type = context.schema.type || '';
|
const type = context.schema.type || '';
|
||||||
const supportStatic = SUPPORT_STATIC_FORMITEM_CMPTS.includes(type);
|
const supportStatic = SUPPORT_STATIC_FORMITEM_CMPTS.includes(type);
|
||||||
const ignoreName = ~['button', 'submit', 'reset'].indexOf(
|
const ignoreName = ~['button', 'submit', 'reset'].indexOf(type);
|
||||||
type
|
|
||||||
);
|
|
||||||
const notRequiredName = ~[
|
const notRequiredName = ~[
|
||||||
'button-toobar',
|
'button-toobar',
|
||||||
'container',
|
'container',
|
||||||
@ -159,12 +157,14 @@ export class ItemPlugin extends BasePlugin {
|
|||||||
name: 'descriptionClassName',
|
name: 'descriptionClassName',
|
||||||
visibleOn: 'this.description'
|
visibleOn: 'this.description'
|
||||||
}),
|
}),
|
||||||
...!supportStatic ? [] : [
|
...(!supportStatic
|
||||||
|
? []
|
||||||
|
: [
|
||||||
getSchemaTpl('className', {
|
getSchemaTpl('className', {
|
||||||
label: '静态 CSS 类名',
|
label: '静态 CSS 类名',
|
||||||
name: 'staticClassName'
|
name: 'staticClassName'
|
||||||
})
|
})
|
||||||
]
|
])
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -177,8 +177,7 @@ export class ItemPlugin extends BasePlugin {
|
|||||||
supportStatic ? getSchemaTpl('static') : null,
|
supportStatic ? getSchemaTpl('static') : null,
|
||||||
getSchemaTpl('switch', {
|
getSchemaTpl('switch', {
|
||||||
name: 'clearValueOnHidden',
|
name: 'clearValueOnHidden',
|
||||||
label: '隐藏时删除表单项值',
|
label: '隐藏时删除表单项值'
|
||||||
disabledOn: 'typeof this.visible === "boolean"'
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user