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',
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<T = SystemDictTypeApi.DictType>(
{
field: 'name',
title: '字典名称',
minWidth: 180,
minWidth: 200,
},
// TODO @芋艿disable的
{
field: 'type',
title: '字典类型',
@ -118,7 +119,7 @@ export function useTypeGridColumns<T = SystemDictTypeApi.DictType>(
{
field: 'status',
title: '状态',
minWidth: 180,
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },