From cdbbaa89476e845010943ee9e37750c7688eb3e9 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: Mon, 25 Apr 2022 09:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F=E5=90=8E=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 182 +++++++++++++++------------ src/components/ImageUpload/index.vue | 3 +- 2 files changed, 104 insertions(+), 81 deletions(-) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 3b9b581..cb4cdfb 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -1,33 +1,50 @@ @@ -221,4 +242,7 @@ function submitUpload() { .ele-upload-list__item-content-action .el-link { margin-right: 10px; } +.doc-icon { + margin: 0 10px; +} diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index b45a704..2f17b7f 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -115,11 +115,10 @@ function handleRemove(file, files) { function handleUploadSuccess(res) { uploadList.value.push({ name: res.data.fileName, url: res.data.url }) if (uploadList.value.length === number.value) { - fileList.value = fileList.value.concat(uploadList.value) + fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value) uploadList.value = [] number.value = 0 emit('update:modelValue', listToString(fileList.value)) - // emit('success', listToString(fileList.value)) proxy.$modal.closeLoading() } }