一个页面多个el-upload上传
时间: 2023-09-05 20:14:07 浏览: 108
一个页面可以有多个el-upload上传组件。在el-upload上动态绑定ref,可以通过获取对应的ref来调用上传组件的方法,例如clearFiles()进行文件清空操作。这样在每次上传成功后,可以清空文件并继续进行下一次上传。同时,可以在el-upload组件的任意上级元素上添加v-if="updateInit"来初始化el-upload组件,这样每个el-upload组件都会有自己的上传功能。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [el-upload多文件上传;el-upload采用递归依次上传...el-upload采用递归在上一个文件上传成功后再传下一个文件](https://blog.csdn.net/i_am_a_div/article/details/127431603)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [组件中多个el-upload存在导致上传图片失效的问题](https://blog.csdn.net/weixin_42157001/article/details/122822743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文