amis-saas-6023 [Improvement.] [弹窗/抽屉]的配置面板,尺寸加上“标准”选项,position默认指定right

Change-Id: I0e41922f93ef2ec92acde227568e452106ce02b8
This commit is contained in:
zhangzhulei 2022-08-22 14:12:05 +08:00
parent a3df41f01d
commit 3282287beb
2 changed files with 13 additions and 6 deletions

View File

@ -135,6 +135,10 @@ export class DialogPlugin extends BasePlugin {
name: 'size',
size: 'sm',
options: [
{
label: '标准',
value: ''
},
{
label: '小',
value: 'sm'
@ -152,7 +156,8 @@ export class DialogPlugin extends BasePlugin {
value: 'xl'
}
],
pipeIn: defaultValue('md')
pipeIn: defaultValue(''),
pipeOut: (value: string) => value ? value : undefined
}
]
},

View File

@ -122,7 +122,8 @@ export class DrawerPlugin extends BasePlugin {
value: 'bottom'
}
],
pipeIn: defaultValue('right')
pipeIn: defaultValue('right'),
pipeOut: (value: any) => value ? value : 'right'
},
getSchemaTpl('switch', {
name: 'overlay',
@ -166,8 +167,8 @@ export class DrawerPlugin extends BasePlugin {
mode: 'horizontal',
options: [
{
label: '超小',
value: 'xs'
label: '标准',
value: ''
},
{
label: '小',
@ -186,7 +187,8 @@ export class DrawerPlugin extends BasePlugin {
value: 'xl'
}
],
pipeIn: defaultValue('md')
pipeIn: defaultValue(''),
pipeOut: (value: string) => value ? value : undefined
},
getSchemaTpl('style:widthHeight', {
widthSchema: {
@ -201,7 +203,7 @@ export class DrawerPlugin extends BasePlugin {
'高度',
'位置为 "上" 或 "下" 时生效。 默认宽度为"尺寸"字段配置的高度,值单位默认为 px也支持百分比等单位 100%'
),
disabledOn: 'this.position === "left" || this.position === "right"'
disabledOn: 'this.position === "left" || this.position === "right" || !this.position'
}
})
]