Commit 062b2818 authored by sixiaofeng's avatar sixiaofeng

Merge remote-tracking branch 'origin/main'

parents 1dcf66cb c5e67198
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
type="file" type="file"
id="uploadFile" id="uploadFile"
ref="uploadFile" ref="uploadFile"
accept=".xlsx"
class="hidden" class="hidden"
@input="fileHandler" @input="fileHandler"
/> />
...@@ -139,7 +138,11 @@ export default Vue.extend({ ...@@ -139,7 +138,11 @@ export default Vue.extend({
if (target.files && target.files?.length !== 0) { if (target.files && target.files?.length !== 0) {
console.log(target.files); console.log(target.files);
const file = target.files[0]; const file = target.files[0];
this.file = file; if (file.name.match(/\.xlsx$/)) {
this.file = file;
} else {
Toast.fail('请选择xlsx文件')
}
} }
}, },
uploadFile() { uploadFile() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment