[Bug Report] upload组件中使用http-request绑定的函数声明async报错Cannot read properties of undefined (reading 'uid')
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.15.13
### OS/Browsers version
win10 chrome 版本 111.0.5563.64(正式版本) (64 位)
### Vue version
2.7.11
### Reproduction Link
https://jsfiddle.net/
### Steps to reproduce
1. 使用upload组件
2. 绑定:http-request="handleUploadFile"
3. 声明handleUploadFile为async
### What is Expected?
1. 允许http-request绑定的函数使用async await
### What is actually happening?
异常: TypeError: Cannot read properties of undefined (reading 'uid')
at eval (upload.js?89a9:1158:1)
at Array.map ()
at VueComponent.handler (upload.js?89a9:1157:1)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1863:1)
at Watcher.run (vue.runtime.esm.js?2b0e:4584:1)
at flushSchedulerQueue (vue.runtime.esm.js?2b0e:4326:1)
at Array.eval (vue.runtime.esm.js?2b0e:1989:1)
at flushCallbacks (vue.runtime.esm.js?2b0e:1915:1)
item.uid = item.uid || Date.now() _this.tempIndex ;
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.