el-upload 组件在 on-success 文件上传成功的钩子中传递更多参数
<el-table-column
label="附件"
align="center"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-upload
:action="baseUrl"
:headers="config"
:file-list="fileList"
:on-success="
(response, file, fileList) => {
return handleSuccess(response, file, fileList, scope.row);
}
"
>
<el-button type="text">点击上传</el-button>
</el-upload>
</template>
// 文件上传成功时的钩子
handleSuccess(response, file, fileList, rowInfo) {
console.log(response, file, fileList, rowInfo);
},