feat: dict type disabled

pull/87/MERGE
xingyu4j 2025-05-02 14:14:07 +08:00
parent 8ab311b46f
commit c9d5b55870
1 changed files with 7 additions and 6 deletions

View File

@ -38,13 +38,15 @@ export function useTypeFormSchema(): VbenFormSchema[] {
fieldName: 'type', fieldName: 'type',
label: '字典类型', label: '字典类型',
component: 'Input', component: 'Input',
componentProps: { componentProps: (values) => {
return {
placeholder: '请输入字典类型', placeholder: '请输入字典类型',
disabled: !!values.id,
};
}, },
rules: 'required', rules: 'required',
dependencies: { dependencies: {
triggerFields: [''], triggerFields: [''],
disabled: ({ values }) => values.id,
}, },
}, },
{ {
@ -107,9 +109,8 @@ export function useTypeGridColumns<T = SystemDictTypeApi.DictType>(
{ {
field: 'name', field: 'name',
title: '字典名称', title: '字典名称',
minWidth: 180, minWidth: 200,
}, },
// TODO @芋艿disable的
{ {
field: 'type', field: 'type',
title: '字典类型', title: '字典类型',
@ -118,7 +119,7 @@ export function useTypeGridColumns<T = SystemDictTypeApi.DictType>(
{ {
field: 'status', field: 'status',
title: '状态', title: '状态',
minWidth: 180, minWidth: 120,
cellRender: { cellRender: {
name: 'CellDict', name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS }, props: { type: DICT_TYPE.COMMON_STATUS },