wx.createSelectorQuery返回的top值有误,不稳定,是根据什么判断的?
this.createSelectorQuery().select("#footer").boundingClientRect((res) => {
let height = windowHeight - res.height;
console.log(top)
console.log(height)
if (top < height) {
this.setData({
fix: true
}
1 回复