Selaa lähdekoodia

上传图片删除问题

yanliming 1 vuosi sitten
vanhempi
commit
3e2ef97143
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      src/views/base/recruitInformationInfo-detail.vue

+ 7 - 1
src/views/base/recruitInformationInfo-detail.vue

@@ -273,8 +273,14 @@
       },
       //老师风采-图片上传--移除
       handleRemove(file) {
+        var self = this;
         console.log(file.response);
-        this.fileList.pop(file.response);
+        //alert(JSON.stringify(file))
+        self.fileList.forEach(function(item, index) {
+            if(item["name"]==file.name){
+              self.fileList.splice(index,1);
+            }
+        })
       },
       //老师风采--图片上传数组
       handlePictureCardPreview(res,file) {