wip: Form升级中

This commit is contained in:
kailong321200875
2023-04-26 17:49:30 +08:00
parent 09fe3467f6
commit 28d1654b20
6 changed files with 779 additions and 694 deletions

View File

@@ -72,13 +72,11 @@ export const setGridProp = (col: ColProps = {}): ColProps => {
* @returns 默认添加 clearable 属性
*/
export const setComponentProps = (item: FormSchema): Recordable => {
const notNeedClearable = ['ColorPicker']
const componentProps: Recordable = notNeedClearable.includes(item.component as string)
? { ...item.componentProps }
: {
clearable: true,
...item.componentProps
}
// const notNeedClearable = ['ColorPicker']
const componentProps = {
clearable: true,
...item.componentProps
}
// 需要删除额外的属性
delete componentProps?.slots
return componentProps