🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/components/form-file/form-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,16 @@ export const BFormFile = /*#__PURE__*/ Vue.extend({
}
},
reset() {
// IE 11 doesn't support setting `$input.value` to `''` or `null`
// So we use this little extra hack to reset the value, just in case
// This also appears to work on modern browsers as well
// Wrapped in try in case IE 11 or mobile Safari crap out
try {
// Wrapped in try in case IE 11 craps out
this.$refs.input.value = ''
const $input = this.$refs.input
$input.value = ''
$input.type = ''
$input.type = 'file'
} catch (e) {}
// IE 11 doesn't support setting `input.value` to '' or null
// So we use this little extra hack to reset the value, just in case.
// This also appears to work on modern browsers as well.
this.$refs.input.type = ''
this.$refs.input.type = 'file'
this.selectedFile = this.multiple ? [] : null
},
onFileChange(evt) {
Expand Down