<img :src="icon" alt="" style="width:100%; object-fit: cover;"/>
async seeImg(row) {
this.dialogVisible = true;
let params = {
pic_id: row.TradeId,
plate: row.VehiclePlate
}
const { data } = await getpic(params);
let blob = new Blob([data],{type: "image/png"});
let url = window.URL.createObjectURL(blob);
this.icon = url;
}
在调用接口的时候添加 responseType: 'blob'属性
最后
以上就是鲤鱼小蚂蚁最近收集整理的关于后台返回的图片流如何展示在前端的全部内容,更多相关后台返回内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复