原始写法:
:on-success="handleAvatarSuccess"
加入自定义参数
:on-success="function (res, file) { return handleAvatarSuccess(res, file, index) }"
handleAvatarSuccess(res, file, index) {
},
其他tip:
上传文件预览方法
let URL = window.URL || window.webkitURL;
this.imgUrl=URL.createObjectURL(file.raw)