input事件change无法上传相同文件的问题

html

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

JS

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

vue

<input ref="referenceUpload" @change="referenceUpload" type="file" accept=".map"  multiple/>
 methods: {
    referenceUpload(e) {
      this.$refs.referenceUpload.value = null;
    },
  }

https://www.cnblogs.com/alantao/p/10010181.html

https://www.cnblogs.com/wuhjbk/p/10171188.html

posted @ 2020-04-05 11:04  ThisCall  阅读(440)  评论(0编辑  收藏  举报