windowHeight这个可使用高度到底是什么?

发布于 6 年前作者 xiulan08945 次浏览最后编辑 6 年前来自 issues

只是单纯的屏幕高度减去导航栏高度吗?那我用wx:for渲染list集合的内容,那高度怎么获取呢?

1 回复
gangwu
gangwu1 楼4 年前

在渲染后的list外面包一个view,并设id=‘the-id’,然后:

wx.createSelectorQuery().select('#the-id').boundingClientRect()