From 6b36385fa55a97144819e9cd6afc62f9314db438 Mon Sep 17 00:00:00 2001
From: CrazyLionLi <31852897+JavaLionLi@users.noreply.github.com>
Date: 星期一, 18 四月 2022 20:01:57 +0800
Subject: [PATCH] fix 修复图片上传组件 数据异常问题
---
src/components/ImageUpload/index.vue | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index a4e4b03..6dc2e25 100644
--- a/src/components/ImageUpload/index.vue
+++ b/src/components/ImageUpload/index.vue
@@ -116,7 +116,7 @@
function handleUploadSuccess(res) {
uploadList.value.push({ name: res.fileName, url: res.fileName });
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));
--
Gitblit v1.9.3