element-ui upload 上传携带多个参数(一个或多个参数)

   

             

                class="avatar-uploader"

                :data="scope"

                action="https://jsonplaceholder.typicode.com/posts/"

                :show-file-list="false"

                :on-success="(response, file, fileList)=>handleAvatarSuccess(response, file, fileList,index)"
:on-remove="(file, fileList)=>handleRemove(file, fileList,index1,index2)">

                :before-upload="beforeAvatarUpload">

               

               

             

           

 handleAvatarSuccess(response, file, fileList, val) {
     console.log('onSuccess额外参数val------',val);    // 1
}
 handleRemove(file, fileList, var1,var2) {
     console.log(var1,var2);    /
}

你可能感兴趣的:(elementUI,ui)