//可以写在app.vue中
globalData: {
navHeight:`${uni.getMenuButtonBoundingClientRect().top * 2}rpx`, //设置自定义导航栏和胶囊处于同一水平线
},
uniapp开发微信小程序获取胶囊位置,自定义title
最新推荐文章于 2024-06-27 16:38:23 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
//可以写在app.vue中
globalData: {
navHeight:`${uni.getMenuButtonBoundingClientRect().top * 2}rpx`, //设置自定义导航栏和胶囊处于同一水平线
},