diff --git a/package/component/src/component/upload/index.vue b/package/component/src/component/upload/index.vue index b38f1912..0cc84f6c 100644 --- a/package/component/src/component/upload/index.vue +++ b/package/component/src/component/upload/index.vue @@ -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) => { diff --git a/package/document-component/src/document/zh-CN/components/upload.md b/package/document-component/src/document/zh-CN/components/upload.md index d6803c8b..fb881ae5 100644 --- a/package/document-component/src/document/zh-CN/components/upload.md +++ b/package/document-component/src/document/zh-CN/components/upload.md @@ -13,7 +13,7 @@ ::: demo 使用 `lay-upload` 标签, 创建一个上传按钮