fix:导航栏样式修复

master
blak-kong 2 years ago
parent 0041b69e61
commit 0f0bca2771

@ -53,9 +53,8 @@
"@tarojs/plugin-platform-weapp": "3.6.19",
"@tarojs/react": "3.6.19",
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"@visactor/taro-vchart": "^1.9.0",
"dayjs": "^1.11.10",
"echarts": "^5.5.0",
"lodash": "^4.17.15",

@ -49,8 +49,7 @@ export default class Navbar extends Component<any, any> {
success: (res) => {
const statusBarHeight = res.statusBarHeight || 0;
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
// const custom = Taro.getMenuButtonBoundingClientRect();
const custom = { height: 60, top: 20 };
const custom = Taro.getMenuButtonBoundingClientRect();
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
const navigationBarHeight =
custom.height + (custom.top - statusBarHeight) * 2;

Loading…
Cancel
Save