From 9af3734b784c098679b6936cdee6369648e8010b Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Tue, 11 Jul 2023 12:46:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useVxeCrudSchemas.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hooks/web/useVxeCrudSchemas.ts b/src/hooks/web/useVxeCrudSchemas.ts index 5c765d4f..0ed3f5fe 100644 --- a/src/hooks/web/useVxeCrudSchemas.ts +++ b/src/hooks/web/useVxeCrudSchemas.ts @@ -269,7 +269,8 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => { defaultValue = 0 } } - let comonentProps = {} + const componentProps = + schemaItem.form?.componentProps != null ? schemaItem.form?.componentProps : {} if (schemaItem.dictType) { const options: ComponentOptions[] = [] if (schemaItem.dictClass && schemaItem.dictClass === 'number') { @@ -285,14 +286,12 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => { options.push(dict) }) } - comonentProps = { - options: options - } + componentProps.options = options if (!(schemaItem.form && schemaItem.form.component)) component = 'Select' } const formSchemaItem = { component: component, - componentProps: comonentProps, + componentProps: componentProps, value: defaultValue, ...schemaItem.form, field: schemaItem.field,