fix 修复 vue 类型识别问题

This commit is contained in:
ahao
2023-12-27 12:12:51 +08:00
parent 321f21c498
commit 3922c16601
19 changed files with 204 additions and 91 deletions
+2 -2
View File
@@ -81,14 +81,14 @@ const imageUploadRef = ref<ElUploadInstance>();
watch(
() => props.modelValue,
async (val) => {
async (val: string) => {
if (val) {
// 首先将值转为数组
let list: OssVO[] = [];
if (Array.isArray(val)) {
list = val as OssVO[];
} else {
const res = await listByIds(val as string);
const res = await listByIds(val);
list = res.data;
}
// 然后将数组转为对象数组