因为官方文档on-success的参数是固定的三个参数response,file,filelist,如果要增加插槽的scope参数传递,可以使用箭头函数的方式:
<el-upload class="upload-demo"
action="//leads.sales.sina.com.cn/api/upload/file"
:on-success="(response,file,filelist)=> fileUploadSuccess(scope.row, response,file,filelist)"
:on-error="fileUploadError"
:campaign_id="scope.row.id">
<el-button slot="trigger" size="small" type="primary">选择XLS文件</el-button>
<div v-show="!scope.row.filePath" class="noprepare">表格未准备</div>
</el-upload>
网友评论