fix: 修复useCrudSchemas无法自定义label

This commit is contained in:
kailong321200875 2023-09-21 14:19:45 +08:00
parent 812e30f4ac
commit aa5deb1390
1 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
component: schemaItem?.search?.component || 'Input',
...schemaItem.search,
field: schemaItem.field,
label: schemaItem.label
label: schemaItem.search?.label || schemaItem.label
}
// 删除不必要的字段
@ -103,8 +103,8 @@ const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
conversion: (schema: CrudSchema) => {
if (!schema?.table?.hidden) {
return {
...schema.table,
...schema
...schema,
...schema.table
}
}
}
@ -132,7 +132,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
component: formItem?.form?.component || 'Input',
...formItem.form,
field: formItem.field,
label: formItem.label
label: formItem.form?.label || formItem.label
}
// 删除不必要的字段