소스 검색

上传图片删除问题

yanliming 2 년 전
부모
커밋
3e2ef97143
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  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) {