ソースを参照

修复多图时无法删除相应图片问题

RuoYi 4 年 前
コミット
7e72849d05
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      ruoyi-ui/src/components/ImageUpload/index.vue

+ 1 - 1
ruoyi-ui/src/components/ImageUpload/index.vue

@@ -111,7 +111,7 @@ export default {
111 111
   methods: {
112 112
     // 删除图片
113 113
     handleRemove(file, fileList) {
114
-      const findex = this.fileList.indexOf(file.name);
114
+      const findex = this.fileList.map(f => f.name).indexOf(file.name);
115 115
       this.fileList.splice(findex, 1);
116 116
       this.$emit("input", this.listToString(this.fileList));
117 117
     },