From 9c60aa364080d258c640ca3ec1f6b77af6cf3064 Mon Sep 17 00:00:00 2001 From: xingyuv Date: Tue, 21 Mar 2023 18:20:13 +0800 Subject: [PATCH] feat: dict view done --- src/views/system/dict/DictData.vue | 51 +++++++++++++++---------- src/views/system/dict/DictDataModel.vue | 4 ++ src/views/system/dict/dict.data.ts | 3 +- src/views/system/dict/index.vue | 47 +++++++++++------------ 4 files changed, 60 insertions(+), 45 deletions(-) diff --git a/src/views/system/dict/DictData.vue b/src/views/system/dict/DictData.vue index 5d6c7e88..64a64b4c 100644 --- a/src/views/system/dict/DictData.vue +++ b/src/views/system/dict/DictData.vue @@ -1,6 +1,6 @@ diff --git a/src/views/system/dict/DictDataModel.vue b/src/views/system/dict/DictDataModel.vue index 9c1e7102..728146bb 100644 --- a/src/views/system/dict/DictDataModel.vue +++ b/src/views/system/dict/DictDataModel.vue @@ -35,6 +35,10 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data setFieldsValue({ ...res }) + } else { + setFieldsValue({ + dictType: data.record + }) } }) diff --git a/src/views/system/dict/dict.data.ts b/src/views/system/dict/dict.data.ts index 45c3cbdb..db5b1203 100644 --- a/src/views/system/dict/dict.data.ts +++ b/src/views/system/dict/dict.data.ts @@ -84,7 +84,8 @@ export const dataFormSchema: FormSchema[] = [ label: '字典类型', field: 'dictType', required: true, - component: 'Input' + component: 'Input', + dynamicDisabled: ({ values }) => !!values.dictType }, { label: '数据标签', diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index e095cf94..94ee634c 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -1,6 +1,6 @@ - +