$imgWH(img_url){
return new Promise((resolve, reject) => {
let img = new Image();
img.src = img_url;
img.onload = function(){
let imgInfo = {
width: img.width,
height: img.height
}
resolve(imgInfo);
}
})
}
methods: {
async bigHeight(){
let heightArr = [];
for (let value of this.datas.pictureArr.values()) {
let info = await this.$imgWH(value.picUrl);
let h = info.height*375 / info.width;
heightArr.push(h);
}
this.imgHeight = Math.max(...heightArr);
}
},