//拖拽图片顺序事件
datadragEnd: function () {
var that = this;
var img = new Image();
// 改变图片的src
img.src = this.model.data.list[0].picurl_cdn;
let res = {}
img.onload = function () {
res = {
width: img.width,
height: img.height
}
that.model.data.firstPicWh = res;
console.log(res); //打印的即是图片的宽高
}
},
使用Vue获取URL图片的宽高
最新推荐文章于 2024-12-09 19:05:28 发布