Skip to content

Commit

Permalink
fix: 修复useCrudSchemas无法自定义label
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Sep 21, 2023
1 parent 812e30f commit aa5deb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hooks/web/useCrudSchemas.ts
Expand Up @@ -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
}

// 删除不必要的字段
Expand All @@ -103,8 +103,8 @@ const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
conversion: (schema: CrudSchema) => {
if (!schema?.table?.hidden) {
return {
...schema.table,
...schema
...schema,
...schema.table
}
}
}
Expand Down Expand Up @@ -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
}

// 删除不必要的字段
Expand Down

0 comments on commit aa5deb1

Please sign in to comment.