// 动态计算滚动区域高度
computeScrollViewHeight(){
let that = this;
let query = wx.createSelectorQuery().in(this);
query.select('.topmenu').boundingClientRect(function(res){
let headHight = res.height;
let screeHeight = wx.getSystemInfoSync().windowHeight;
let scrollHeight = screeHeight - headHight;
that.setData({
scrollViewHeight:scrollHeight
});
}).exec();
}
网友评论