Browse Source

无法上传同一个文件问题

gangyj 2 năm trước cách đây
mục cha
commit
c065046a08
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      src/views/exctab/excelmodel/excelmodel.vue

+ 5 - 0
src/views/exctab/excelmodel/excelmodel.vue

@@ -85,6 +85,7 @@
               :file-list='fileList'
               accept=".xls,.xlsx"
               :on-change="uploadChange"
+              ref="file1"
             >
               <el-button
                 type="primary"
@@ -114,6 +115,7 @@
               :file-list='fileList'
               accept=".xls,.xlsx"
               :on-change="uploadChange"
+              ref="file2"
             >
               <el-button
                 type="primary"
@@ -514,6 +516,9 @@ export default {
       } catch (error) {
         loading.close();
       }
+
+      this.$refs.file1.clearFiles();
+      this.$refs.file2.clearFiles();
     },
     delectExcelMS () {//删除excel表点击事件、
       let _that = this