完善上传图片组件:编辑图片报错问题,感谢@秦白起
This commit is contained in:
parent
e19be90529
commit
5683c89c0e
@ -97,7 +97,9 @@ watch(
|
|||||||
list = val as OssVO[];
|
list = val as OssVO[];
|
||||||
} else {
|
} else {
|
||||||
const res = await listByIds(val);
|
const res = await listByIds(val);
|
||||||
list = res.data;
|
//list = res.data;
|
||||||
|
// 处理 val 为字符串的情况,封装成一个 OssVO 对象
|
||||||
|
list = [{ name: val, url: val }];
|
||||||
}
|
}
|
||||||
// 然后将数组转为对象数组
|
// 然后将数组转为对象数组
|
||||||
fileList.value = list.map((item) => {
|
fileList.value = list.map((item) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user