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