From 5896bf05cd9535c1cc5f05b3c43c7b13318824c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Sun, 16 Apr 2023 18:42:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E6=AC=A1=E4=BC=9A=E5=A4=9A=E6=98=BE=E7=A4=BA=E4=B8=80=E6=9D=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 117b7e1..d7bf228 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -212,9 +212,12 @@ function getFileName(name) { function listToString(list, separator) { let strs = '' separator = separator || ',' - for (let i in list) { - strs += list[i].url + separator - } + + list.forEach((element) => { + if (element) { + strs += element.url + separator + } + }) return strs != '' ? strs.substr(0, strs.length - 1) : '' } // 手动提交上传