From d097a88fc31b39f55416cbaffffb0e8c5833bb03 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 17 Jul 2024 11:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useCrudSchemas.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index f74c14467..541ca87b6 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -271,6 +271,10 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For comonentProps = { options: options } + // 可编辑字典-下拉框默认选中第一条数据 --喜婷 + if(options.length>0&&!schemaItem.form?.componentProps?.disabled){ + defaultValue = options[0].value + } if (!(schemaItem.form && schemaItem.form.component)) component = 'Select' }