以下方法適用于使用v-for循環(huán)出的多個文件/圖片上傳組件(el-upload)的區(qū)分或者多個上傳組件通過傳遞參數(shù)進行區(qū)分區(qū)分
文檔:on-success 文件上傳成功時的鉤子 返回的參數(shù)為function(response, file, fileList)
我記得table組件里的也是這樣用的
:before-upload="(file) => { return beforeAvatarUpload(file,index)}"
:on-success="(response, file, fileList)=>{return handleAvatarSuccess(response, file, fileList,index)}"