uni.getSystemInfo({
success: (data)=> {
let custom = wx.getMenuButtonBoundingClientRect()
//导航栏高度 = 状态栏到胶囊的间距(胶囊距上距离-状态栏高度) * 2 + 胶囊高度 + 状态栏高度。
this.navHeight = custom.bottom + custom.top - data.statusBarHeight
}
})
uniapp微信小程序获取手机状态栏高度
最新推荐文章于 2024-04-11 11:44:55 发布