获取可视区域的高度|获取其某个节点的高度
let that = this
let searchHeight = null;
let searchDom = uni.createSelectorQuery().select('.search');
searchDom.boundingClientRect(data => {
searchHeight = data.height
}).exec()
// 获取可是区域的高度
uni.getSystemInfo({
success(res) {
that.height = res.windowHeight - searchHeight
}
})
相关作者
- 获取点赞0
- 文章阅读量264
评论()