1、使用uploadList自动上传,上传成功后,缩略图丢失,出现了svg图标,如图
2、究其原因,缩略图的显示是因为,upload组件触发handleChange事件,在uploadList 组件上的 previewFile再次触发,fileList 更新时存储缩略图,此时发现缩略图丢失是因为上传的文件没有给file.thumbUrl赋值为base64。
源码UploadList.js
3、解决方法,在Upload.js文件中,添加
targetItem.thumbUrl= window._CONFIG[‘domianURL’] + ‘/sys/common/view/’+ response.message,为了防止预览时由于base64这个字符