vue element ui el-upload 上传组件在成功,失败等钩子函数增加参数
vue element ui el-upload 上传组件在成功,失败等钩子函数增加参数这是官方文档中对钩子函数的描述![](https://img-blog.csdnimg.cn/20191108131627684.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nL
·
vue element ui el-upload 上传组件在成功,失败等钩子函数增加参数
这是官方文档中对钩子函数的描述
如何增加自定义的参数?
<el-upload
class="inline-block"
:action="url()"
:headers="heards"
:show-file-list="false"
:on-error="uploadError"
:on-success="(response,file,fileList)=>{return uploadSucess(response,file,fileList, scope.$index,cardList[scope.$index].cardPath)}">
<el-button type="primary" size="mini">上传附件</el-button>
</el-upload>
如图所示在on-success 增加一个箭头函数 返回一个自定义的函数将当前行的索引和想要的参数传入即可
更多推荐
已为社区贡献1条内容
所有评论(0)