| | |
| | | |
| | | setNavigationBarHeight(systemInfo: Taro.getSystemInfoSync.Result) { |
| | | try { |
| | | if (!isWeb) { |
| | | const { right, height, width, top } = Taro.getMenuButtonBoundingClientRect(); |
| | | |
| | | this.menuButtonHeight = height; |
| | | this.menuButtonWidth = width; |
| | | this.menuButtonTop = top; |
| | | this.menuButtonRightDistance = systemInfo.screenWidth - right; |
| | | } |
| | | let navigationBarHeight = 0; |
| | | |
| | | if (systemInfo.platform === 'android') { |
| | |
| | | } else { |
| | | navigationBarHeight = 44; |
| | | } |
| | | this.menuButtonHeight = height; |
| | | this.menuButtonWidth = width; |
| | | this.menuButtonTop = top; |
| | | this.menuButtonRightDistance = systemInfo.screenWidth - right; |
| | | this.navigationBarHeight = navigationBarHeight; |
| | | } catch (error) {} |
| | | }, |