From 5d249398fc5512aa21e122ca54202fd419223826 Mon Sep 17 00:00:00 2001 From: Qiuner Date: Fri, 20 Sep 2024 11:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9DictTag=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=A4=E6=96=ADoptions=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index e29b276f5..c710cb69a 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -55,7 +55,7 @@ const values = computed(() => { const unmatch = computed(() => { unmatchArray.value = []; // 没有value不显示 - if (props.value === null || typeof props.value === 'undefined' || props.value === '' || props.options.length === 0) return false + if (props.value === null || typeof props.value === 'undefined' || props.value === '' || !Array.isArray(props.options) || props.options.length === 0) return false // 传入值为数组 let unmatch = false // 添加一个标志来判断是否有未匹配项 values.value.forEach(item => {