feat:框架代码 关于流程信息变更的代码更新
This commit is contained in:
@ -467,16 +467,16 @@ function getTableItemConfig(tableName: string, element) {
|
||||
}
|
||||
|
||||
// 辅助设置表单Disabled
|
||||
export function changeSchemaDisabled(schemas) {
|
||||
export function changeSchemaDisabled(schemas,isDisabled=true) {
|
||||
const layoutComponents = ['tab', 'grid', 'card'];
|
||||
schemas?.map((info) => {
|
||||
if (layoutComponents.includes(info.type!)) {
|
||||
info.children?.map((childInfo) => {
|
||||
childInfo.list.map((com) => {
|
||||
if (layoutComponents.includes(com.type)) {
|
||||
changeSchemaDisabled(childInfo.list);
|
||||
changeSchemaDisabled(childInfo.list,isDisabled);
|
||||
} else {
|
||||
com.dynamicDisabled = true;
|
||||
com.dynamicDisabled = isDisabled;
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -485,17 +485,24 @@ export function changeSchemaDisabled(schemas) {
|
||||
childInfo.list.map((com) => {
|
||||
com.children.map((el) => {
|
||||
if (layoutComponents.includes(el.type) || el.type == 'table-layout') {
|
||||
changeSchemaDisabled(com.children);
|
||||
changeSchemaDisabled(com.children,isDisabled);
|
||||
} else {
|
||||
el.dynamicDisabled = true;
|
||||
el.dynamicDisabled = isDisabled;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} else if (info.type == 'one-for-one') {
|
||||
changeSchemaDisabled(info.componentProps.childSchemas);
|
||||
changeSchemaDisabled(info.componentProps.childSchemas,isDisabled);
|
||||
} else if (info.type == 'form') {
|
||||
info.dynamicDisabled = isDisabled;
|
||||
info.componentProps.disabled = isDisabled;
|
||||
info.componentProps.columns?.forEach((column) => {
|
||||
column.dynamicDisabled = isDisabled;
|
||||
if(column?.componentProps) column.componentProps.disabled = isDisabled
|
||||
})
|
||||
} else {
|
||||
info.dynamicDisabled = true;
|
||||
info.dynamicDisabled = isDisabled;
|
||||
}
|
||||
});
|
||||
return schemas;
|
||||
|
||||
Reference in New Issue
Block a user