图片 文件流回显
- 掉接口获取文件流并处理
getTeamImgURL(id){
this.$api
.downloadFile({fileId: id})
.then(res => {
let blob = new Blob([res], {type: 'image/png'});
const imageUrl = URL.createObjectURL(blob);
this.teamPhotoUrl = imageUrl
})
.catch(err => {})
},
- DOM渲染
<img :src="teamPhotoUrl" alt="" class="teamImg" />