uniapp 获取元素高度

2022-06-28  本文已影响0人  ME88

获取系统信息:  uni.getSystemInfoSync()

app端:

constquery=uni.createSelectorQuery().in(this)query.select('#box').boundingClientRect(data=>{console.log(data.height)}).exec();

H5端:

constquery=uni.createSelectorQuery();query.select('#box').boundingClientRect(data=>{console.log(data.height)}).exec();

上一篇 下一篇

猜你喜欢

热点阅读