12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
建站问答 时间:2024-12-01 19:02:28
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
小程序获取页面高度的代码示例:onReady:function(){//动态获取高度this.autoHeight();},//动态获取高度autoHeight:function(){varthat=this;varquery=wx.createSelectorQuer
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
小程序获取页面高度的代码示例:
onReady:function(){//动态获取高度
this.autoHeight();
},
//动态获取高度
autoHeight:function(){
varthat=this;
varquery=wx.createSelectorQuery();
query.select('.container').boundingClientRect(function(rect){
console.log("----w"+rect.height)
that.setData({
windowHeight:rect.height,//获取页面高度
})
}).exec();
},
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19