From 5683c89c0e6280aa21c26058d7f1516f92fb37c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B0=8F=E7=8E=8B=E5=AD=90?= Date: Tue, 7 May 2024 10:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=BB=84=E4=BB=B6=EF=BC=9A=E7=BC=96=E8=BE=91=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=8C=E6=84=9F?= =?UTF-8?q?=E8=B0=A2@=E7=A7=A6=E7=99=BD=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImageUpload/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 1c6dcd1..c9d745e 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -97,7 +97,9 @@ watch( list = val as OssVO[]; } else { const res = await listByIds(val); - list = res.data; + //list = res.data; + // 处理 val 为字符串的情况,封装成一个 OssVO 对象 + list = [{ name: val, url: val }]; } // 然后将数组转为对象数组 fileList.value = list.map((item) => {