Html

<input id="file" type="file" accept=".map" onchange="upload()" />

JS

document.getElementById('file').value = null;

// document.getElementById('file').onchange = function () {
//    alert(this.value);
//    this.value = null;
// };​

Html

<input ref="referenceUpload" @change="referenceUpload" type="file" accept=".map"  multiple/>

JS

  methods: {
    referenceUpload(e) {
      this.$refs.referenceUpload.value = null;
    },
  }

 

相关文章: