mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-19 03:46:38 +08:00
Pre Merge pull request !17 from huorexiaji/master
This commit is contained in:
commit
7b4cc8815b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user