From c9d5b55870b30d85e1965b8ab426fafb4e37fa54 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 2 May 2025 14:14:07 +0800 Subject: [PATCH] feat: dict type disabled --- apps/web-antd/src/views/system/dict/data.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/system/dict/data.ts b/apps/web-antd/src/views/system/dict/data.ts index 78f0ee524..e35800bb2 100644 --- a/apps/web-antd/src/views/system/dict/data.ts +++ b/apps/web-antd/src/views/system/dict/data.ts @@ -38,13 +38,15 @@ export function useTypeFormSchema(): VbenFormSchema[] { fieldName: 'type', label: '字典类型', component: 'Input', - componentProps: { - placeholder: '请输入字典类型', + componentProps: (values) => { + return { + placeholder: '请输入字典类型', + disabled: !!values.id, + }; }, rules: 'required', dependencies: { triggerFields: [''], - disabled: ({ values }) => values.id, }, }, { @@ -107,9 +109,8 @@ export function useTypeGridColumns( { field: 'name', title: '字典名称', - minWidth: 180, + minWidth: 200, }, - // TODO @芋艿:disable的; { field: 'type', title: '字典类型', @@ -118,7 +119,7 @@ export function useTypeGridColumns( { field: 'status', title: '状态', - minWidth: 180, + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.COMMON_STATUS },