data: {
    statusbar: 0
  },
 页面获取状态栏高度
  onLoad: function (e) {
    const res = wx.getSystemInfoSync()
    var statusbarH = res.statusBarHeight
    this.setData({
        statusbar :statusbarH
    })
},
 组件获取状态栏高度
  attached() {
    const res = wx.getSystemInfoSync()
    var statusbarH = res.statusBarHeight
    this.setData({
      statusbar: statusbarH
    })
  },

相关文章:

  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-11-15
  • 2022-01-07
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2021-11-28
  • 2021-09-16
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案