🐛(upload): 修复 upload 组件连续选择两个相同文件无法触发上传的问题

This commit is contained in:
就眠儀式
2022-10-31 22:27:56 +08:00
parent 2600e6756f
commit 45746111b8
2 changed files with 6 additions and 4 deletions

View File

@@ -234,7 +234,7 @@ const errorF = (errorText: string) => {
};
const localUpload = (option: localUploadOption, callback: Function) => {
let xhr: XMLHttpRequest, loadedevt, total, per: number, url, uploading;
let xhr: XMLHttpRequest, url;
xhr = new XMLHttpRequest();
url = option.url;
let formData = option.formData;
@@ -279,6 +279,7 @@ const localUpload = (option: localUploadOption, callback: Function) => {
if (cb && typeof cb == "function") {
cb();
}
(orgFileInput.value as HTMLInputElement).value = "";
};
const filetoDataURL = (file: File, fn: Function) => {