参考elementui 文档
如何通过data 进行额外传递参数?(:data="uploadData"
)
<el-uploadref="fileUploadBtn1"class="upload-demo"accept=".xls,.xlsx" :limit="1" :action="uploadFileUrl" :on-success="handleAvatarSuccess":before-upload="beforeAvatarUpload":data="uploadData":show-file-list="false"><el-button size="medium" type="primary">导入</el-button>
</el-upload>
data(){return{uploadData: {seId: "",}, }
},
method(){
/* 文件上传之前将参数赋值 */beforeAvatarUpload(file) {const _vm = this;_vm.uploadData.seId = this.form.id;}
}