- 问题描述:上传成功后,图片先向右,再摆回位置。出现占位闪现。
图片上传成功后回调事件 on-success='handleAvatarSuccess'
/**
* @param response
* @param file file是本次上传成功的文件信息
* @param fileList fileList是已上传成功的文件列表汇总
*/
handleAvatarSuccess(response, file, fileList) {
//原(图片闪现)
this.imageList.push({
url: response.data
})
//改动后(解决闪现问题)
//1
this.imageList.push(file)
//2
this.imageList = fileList
}
- 去除upload组件过渡效果 css
.el-upload-list__item {
transition: none !important;
}
参考文章:https://blog.csdn.net/feifantiantang/article/details/113523171?ivk_sa=1024320