From f3c89697193d7ff9e8767af3f455ff3f901ccc26 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 26 Apr 2023 18:34:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=AF=8F=E6=AC=A1=E7=82=B9=E5=87=BB=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/codegen/components/data.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/infra/codegen/components/data.ts b/src/views/infra/codegen/components/data.ts index b5e1d588..c2499b88 100644 --- a/src/views/infra/codegen/components/data.ts +++ b/src/views/infra/codegen/components/data.ts @@ -4,6 +4,13 @@ import { FormSchema } from '@/components/Form' import { BasicColumn } from '@/components/Table' import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' +async function getDictTypeOptions() { + const dictTypeOptions: any[] = [] + const res = await listSimpleDictType() + dictTypeOptions.push(...res) + return dictTypeOptions +} + export const basicInfoSchemas: FormSchema[] = [ { label: '基本信息', @@ -307,11 +314,9 @@ export const columns: BasicColumn[] = [ title: '字典类型', dataIndex: 'dictType', editRow: true, - editComponent: 'ApiSelect', + editComponent: 'Select', editComponentProps: { - api: () => listSimpleDictType(), - labelField: 'name', - valueField: 'type' + options: (await getDictTypeOptions()).map((item) => ({ value: item.type, label: item.name })) }, width: 100 },