Browse Source

fix input value is null before upload submit actually

baiyaaaaa 8 năm trước cách đây
mục cha
commit
0c121434e0
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      packages/upload/src/upload.vue

+ 2 - 1
packages/upload/src/upload.vue

@@ -62,7 +62,6 @@ export default {
 
       if (!files) return;
       this.uploadFiles(files);
-      this.$refs.input.value = null;
     },
     uploadFiles(files) {
       let postFiles = Array.prototype.slice.call(files);
@@ -76,6 +75,8 @@ export default {
       });
     },
     upload(rawFile, file) {
+      this.$refs.input.value = null;
+
       if (!this.beforeUpload) {
         return this.post(rawFile);
       }