微信小程序获得高度

wx.getSystemInfo({
            success: (res) => {
              wx.createSelectorQuery().select('#scrollbox').boundingClientRect((rect) => {
                this.setData({
                  height: res.windowHeight - rect.top
                })
              }).exec()
            }
          })

 

posted @ 2019-07-23 16:55  亦心晗  阅读(605)  评论(0编辑  收藏  举报