Element UI version
0.1.0
OS/Browsers version
win10
Vue version
2.5.22
Reproduction Link
https://elementui.github.io/issue-generator/#/zh-CN
Steps to reproduce
通过slot=”{file}“只能获取单文件,当多文件上传时,需要自定义上传列表时获取不到fileList
What is Expected?
希望能将fileList也暴露出来,做到更方便的自定义列表文件。
What is actually happening?
暴露出可操作的fileList
3条答案
按热度按时间66bbxpm51#
现在只能再remove和change时自己手动维护fileList
j1dl9f462#
现在只能再remove和change时自己手动维护fileList
你可以通过定义一个ref指向el-upload组件, ,然后通过 this.$refs.uploadRef.uploadFiles 拿到内部维护的 fileList。
但是要注意里面 file 和 rawFile 区别。rawFile 上并没有维护文件状态 status
nukf8bse3#
i guess this would be a pretty small feature but very handy.
I've looked into the code and this seems enough to me (note that it's just a proposal and not a definite PR)
#21733