From b6a1884f71f221f7b34cb56aa443f3c32bee0ad1 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 30 Dec 2025 14:33:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor(DictTag):=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=89=E9=A1=B9=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 MmMaterialCategory 中状态选项的值类型,将数字改为字符串以保持一致性 --- src/components/DictTag/index.vue | 4 ++-- .../productionMaterial/MmMaterialCategory.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index b910bfb..fbed747 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -46,7 +46,7 @@ const props = defineProps({ } }) const dataList = computed(() => { - if (props.config && typeof props.config === 'object' && props.config.label && props.config.value && props.options) { + if (props.config) { let config = props.config var newList = [] @@ -58,7 +58,7 @@ const dataList = computed(() => { } return newList } - return props.options || [] + return props.options }) const values = computed(() => { if (props.value !== null && typeof props.value !== 'undefined') { diff --git a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue index 1abb6fa..97fad5e 100644 --- a/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue +++ b/src/views/materialManagement/productionMaterial/MmMaterialCategory.vue @@ -242,11 +242,11 @@ const state = reactive({ // 状态(0/1) 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'} statusOptions: [ { - dictValue: 0, + dictValue: '停用', dictLabel: '停用' }, { - dictValue: 1, + dictValue: '启用', dictLabel: '启用' } ]