提交 70b4f9da 编写于 作者: Q qiang

fix: 修复tabBar页面使用原生安全区占位的情况下获取的窗口高度错误的问题

上级 fcd27352
export default {
get bottom () {
if (plus.os.name === 'iOS') {
const safeArea = plus.navigator.getSafeAreaInsets()
return safeArea ? safeArea.bottom : 0
}
return 0
}
}
......@@ -7,8 +7,6 @@ import {
requireNativePlugin
} from '../bridge'
import safeAreaInsets from './safe-area-insets'
const TABBAR_HEIGHT = 50
const isIOS = plus.os.name === 'iOS'
let config
......@@ -164,7 +162,7 @@ export default {
return visible
},
get height () {
return (config && config.height ? parseFloat(config.height) : TABBAR_HEIGHT) + safeAreaInsets.bottom
return (config && config.height ? parseFloat(config.height) : TABBAR_HEIGHT) + plus.navigator.getSafeAreaInsets().deviceBottom
},
// tabBar是否遮挡内容区域
get cover () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册