From b60fa5c920b5eb7cf4a2e3e1cacfe779d2f9ff12 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: Sat, 12 Feb 2022 14:01:41 +0800
Subject: [PATCH] !144 删除方法无返回值时,方法注释上的@return Merge pull request !144 from 我的世界有我/master
---
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