fix: 修复useCrudSchemas无法自定义label
This commit is contained in:
parent
812e30f4ac
commit
aa5deb1390
|
@ -84,7 +84,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
component: schemaItem?.search?.component || 'Input',
|
component: schemaItem?.search?.component || 'Input',
|
||||||
...schemaItem.search,
|
...schemaItem.search,
|
||||||
field: schemaItem.field,
|
field: schemaItem.field,
|
||||||
label: schemaItem.label
|
label: schemaItem.search?.label || schemaItem.label
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除不必要的字段
|
// 删除不必要的字段
|
||||||
|
@ -103,8 +103,8 @@ const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
|
||||||
conversion: (schema: CrudSchema) => {
|
conversion: (schema: CrudSchema) => {
|
||||||
if (!schema?.table?.hidden) {
|
if (!schema?.table?.hidden) {
|
||||||
return {
|
return {
|
||||||
...schema.table,
|
...schema,
|
||||||
...schema
|
...schema.table
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
component: formItem?.form?.component || 'Input',
|
component: formItem?.form?.component || 'Input',
|
||||||
...formItem.form,
|
...formItem.form,
|
||||||
field: formItem.field,
|
field: formItem.field,
|
||||||
label: formItem.label
|
label: formItem.form?.label || formItem.label
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除不必要的字段
|
// 删除不必要的字段
|
||||||
|
|
Loading…
Reference in New Issue