mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:28:32 +08:00
amis-saas-7044 [Improvement.] 「抽屉」外观的宽度、高度应跟随位置变化做清除处理
Change-Id: I3bce28b80d1d184c1876a4ff114be1176a808262
This commit is contained in:
parent
e36441f9a3
commit
a9a5632170
@ -123,7 +123,19 @@ export class DrawerPlugin extends BasePlugin {
|
||||
}
|
||||
],
|
||||
pipeIn: defaultValue('right'),
|
||||
pipeOut: (value: any) => (value ? value : 'right')
|
||||
pipeOut: (value: any) => (value ? value : 'right'),
|
||||
onChange: (
|
||||
value: string,
|
||||
oldValue: string,
|
||||
model: any,
|
||||
form: any
|
||||
) => {
|
||||
if(value === 'left' || value === 'right') {
|
||||
form.deleteValueByName('height');
|
||||
} else if (value === 'top' || value === 'bottom') {
|
||||
form.deleteValueByName('width');
|
||||
}
|
||||
}
|
||||
},
|
||||
getSchemaTpl('switch', {
|
||||
name: 'overlay',
|
||||
@ -196,16 +208,14 @@ export class DrawerPlugin extends BasePlugin {
|
||||
'宽度',
|
||||
'位置为 "左" 或 "右" 时生效。 默认宽度为"尺寸"字段配置的宽度,值单位默认为 px,也支持百分比等单位 ,如:100%'
|
||||
),
|
||||
disabledOn:
|
||||
'this.position === "top" || this.position === "bottom"'
|
||||
disabledOn: 'this.position === "top" || this.position === "bottom"'
|
||||
},
|
||||
heightSchema: {
|
||||
label: tipedLabel(
|
||||
'高度',
|
||||
'位置为 "上" 或 "下" 时生效。 默认宽度为"尺寸"字段配置的高度,值单位默认为 px,也支持百分比等单位 ,如:100%'
|
||||
),
|
||||
disabledOn:
|
||||
'this.position === "left" || this.position === "right" || !this.position'
|
||||
disabledOn: 'this.position === "left" || this.position === "right" || !this.position'
|
||||
}
|
||||
})
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user