获取不同型号手机小程序导航栏的高度(uniapp)

uni.getSystemInfo({
      success: function(e) {
          Vue.prototype.StatusBar = e.statusBarHeight;
          let custom = wx.getMenuButtonBoundingClientRect();
          Vue.prototype.Custom = custom;
          Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
    }
});

 

posted @ 2023-06-30 16:49  blackAge  阅读(479)  评论(0)    收藏  举报