From ade1d01e31ba7c04fa9f10a72df644be8c0e5cc8 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期六, 25 六月 2022 09:42:31 +0800
Subject: [PATCH] 新增缓存列表菜单功能

---
 src/components/ImageUpload/index.vue |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index a4e4b03..1c1dc74 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));
@@ -186,3 +186,10 @@
   return strs != "" ? strs.substr(0, strs.length - 1) : "";
 }
 </script>
+
+<style scoped lang="scss">
+// .el-upload--picture-card 鎺у埗鍔犲彿閮ㄥ垎
+::v-deep.hide .el-upload--picture-card {
+    display: none;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3