let query = wx.createSelectorQuery();
query.select('.contents').boundingClientRect(rect=>{
let height = rect.height;
console.log(height);
}).exec();
小程序获取指定元素
最新推荐文章于 2024-03-25 11:22:17 发布
let query = wx.createSelectorQuery();
query.select('.contents').boundingClientRect(rect=>{
let height = rect.height;
console.log(height);
}).exec();