这是官方文档中对钩子函数的描述

如何增加自定义的参数?

                  <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 增加一个箭头函数 返回一个自定义的函数将当前行的索引和想要的参数传入即可

Logo

前往低代码交流专区

更多推荐