index.ts 390 B

12345678910
  1. function getSafeHeight(): number {
  2. const systemInfo: UniApp.GetSystemInfoResult = uni.getSystemInfoSync()
  3. const safeAreaInsetBottom: number = systemInfo.safeAreaInsets.bottom + systemInfo.safeAreaInsets.top
  4. const menuButtonInfoHeight: number = uni.getMenuButtonBoundingClientRect().height + 60
  5. return safeAreaInsetBottom + menuButtonInfoHeight
  6. }
  7. export default {
  8. getSafeHeight
  9. }