提交 b9f0be8a 编写于 作者: D DCloud_LXH

fix(H5): 设置tabbar高度后,getSystemInfoSync()获取windowBottom的高度错误 question/121154

上级 0f4b1e3d
......@@ -23,10 +23,11 @@ const passiveOptions = supportsPassive ? {
function updateCssVar (vm) {
if (uni.canIUse('css.var')) {
const uniConfigTabbarHeight = parseFloat(__uniConfig.tabBar.height)
const pageVm = vm.$parent.$parent
const navigationBarType = pageVm.navigationBar.type
const windowTopValue = navigationBarType === 'default' || navigationBarType === 'float' ? NAVBAR_HEIGHT : 0
const windowBottomValue = getApp().$children[0].showTabBar ? TABBAR_HEIGHT : 0
const windowBottomValue = getApp().$children[0].showTabBar ? isNaN(uniConfigTabbarHeight) ? TABBAR_HEIGHT : uniConfigTabbarHeight : 0
const envMethod = uni.canIUse('css.env') ? 'env' : (uni.canIUse('css.constant') ? 'constant' : '')
const windowTop = windowTopValue && envMethod ? `calc(${windowTopValue}px + ${envMethod}(safe-area-inset-top))`
: `${windowTopValue}px`
......@@ -87,4 +88,4 @@ export default function initSubscribe (subscribe) {
})
}
})
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册