From 08885f65cd6815fbc18a5b485eb9fd99c2a0d2cf Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 24 Nov 2021 16:40:18 +0800
Subject: [PATCH] 升级velocity到最新版本2.3

---
 ruoyi-ui/src/components/ImageUpload/index.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue
index 8597595..1f3a9c1 100644
--- a/ruoyi-ui/src/components/ImageUpload/index.vue
+++ b/ruoyi-ui/src/components/ImageUpload/index.vue
@@ -111,9 +111,11 @@
   methods: {
     // 删除图片
     handleRemove(file, fileList) {
-      const findex = this.fileList.indexOf(file.name);
-      this.fileList.splice(findex, 1);
-      this.$emit("input", this.listToString(this.fileList));
+      const findex = this.fileList.map(f => f.name).indexOf(file.name);
+      if(findex > -1) {
+        this.fileList.splice(findex, 1);
+        this.$emit("input", this.listToString(this.fileList));
+      }
     },
     // 上传成功回调
     handleUploadSuccess(res) {

--
Gitblit v1.9.3