From aa5deb13904e45e7cb6ec7285e936b9ebae57273 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Thu, 21 Sep 2023 14:19:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DuseCrudSchemas?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=87=AA=E5=AE=9A=E4=B9=89label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useCrudSchemas.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index 99eb38a71..6597b9467 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -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 } // 删除不必要的字段