代码
created() {
axios({
url: "http://localhost:8080/img/getimg",
responseType: "blob", //关键
}).then((res) => {
let data = new Blob([res.data]);
let url = window.URL.createObjectURL(data);
this.image = url; //image是图片的路径
});
},
标签:vue,展示,url,res,image,let,data,png
From: https://www.cnblogs.com/luoking/p/16905762.html