Skip to content

Commit

Permalink
🎨 修改eslint错误
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Jan 8, 2022
1 parent 48d197c commit 5bdcbf9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/views/pages/Option/tabs/Tools.vue
Expand Up @@ -97,11 +97,18 @@ export default class Tools extends Vue {
};
importFileChange(ev: Event) {
let file = (<HTMLInputElement>ev.target!).files![0];
const files = (<HTMLInputElement>ev.target).files;
if (!files) {
return;
}
const file = files[0];
if (!file) {
return;
}
const url = URL.createObjectURL(file);
setTimeout(() => {
URL.revokeObjectURL(url);
}, 6e3);
void this.scriptCtl.openImportFileWindow(file.name, url);
}
Expand All @@ -118,7 +125,7 @@ export default class Tools extends Vue {
}
clickImportFile() {
let importFile = <HTMLInputElement>document.getElementById('import-file')!;
let importFile = <HTMLInputElement>document.getElementById('import-file');
importFile.click();
}
Expand Down

0 comments on commit 5bdcbf9

Please sign in to comment.