前端爱码士
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
src/components/Excel/src/ImportExcel.vue
|
|
|
@ -142,9 +142,14 @@ |
|
|
|
* @description: 触发选择文件管理器 |
|
|
|
*/ |
|
|
|
function handleInputClick(e: Event) { |
|
|
|
const files = e && (e.target as HTMLInputElement).files; |
|
|
|
const target = e && (e.target as HTMLInputElement); |
|
|
|
const files = target?.files; |
|
|
|
const rawFile = files && files[0]; // only setting files[0] |
|
|
|
|
|
|
|
target.value = ''; |
|
|
|
|
|
|
|
if (!rawFile) return; |
|
|
|
|
|
|
|
if (props.isReturnFile) { |
|
|
|
emit('success', rawFile); |
|
|
|
return; |
|
|
|
|