- 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
来源: http://www.bubuko.com/infodetail-3492765.html