From b75cc66222b15cdf5241aee75ae783863aa23b30 Mon Sep 17 00:00:00 2001 From: huorexiaji Date: Sat, 25 Mar 2023 07:36:01 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9DictSelect=E7=BB=84=E4=BB=B6b?= =?UTF-8?q?ug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huorexiaji --- .../src/components/support/dict-select/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smart-admin-web/javascript-ant-design-vue3/src/components/support/dict-select/index.vue b/smart-admin-web/javascript-ant-design-vue3/src/components/support/dict-select/index.vue index 18ea0216..3dd2b700 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/components/support/dict-select/index.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/components/support/dict-select/index.vue @@ -58,8 +58,10 @@ // -------------------------- 查询 字典数据 -------------------------- + let valueIsArray = ref(false); const dictValueList = ref([]); async function queryDict() { + valueIsArray = Array.isArray(props.value) let res = await dictApi.valueList(props.keyCode); dictValueList.value = res.data; } @@ -102,7 +104,7 @@ emit('change', selected); return selected; } - if (Array.isArray(props.value)) { + if (valueIsArray) { let valueList = dictValueList.value.filter((e) => value.includes(e.valueCode)); valueList = valueList.map((e) => e.valueCode); emit('update:value', valueList);