From 3c79da59caa925a07fb240c5e268a0ebe7b437c7 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 3 Mar 2020 17:43:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20H5=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=B5=8F=E8=A7=88=20windowTop=20=E5=80=BC=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98=20fixed=20#1356?= =?UTF-8?q?=20#1348?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/h5/view/bridge/subscribe/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/h5/view/bridge/subscribe/index.js b/src/platforms/h5/view/bridge/subscribe/index.js index 8f8f7ed06..5a3108c74 100644 --- a/src/platforms/h5/view/bridge/subscribe/index.js +++ b/src/platforms/h5/view/bridge/subscribe/index.js @@ -28,7 +28,7 @@ function updateCssVar (vm) { const windowTopValue = navigationBarType === 'default' || navigationBarType === 'float' ? NAVBAR_HEIGHT : 0 const windowBottomValue = getApp().$children[0].showTabBar ? TABBAR_HEIGHT : 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}0px` + const windowTop = windowTopValue && envMethod ? `calc(${windowTopValue}px + ${envMethod}(safe-area-inset-top))` : `${windowTopValue}px` const windowBottom = windowBottomValue && envMethod ? `calc(${windowBottomValue}px + ${envMethod}(safe-area-inset-bottom))` : `${windowBottomValue}px` const style = document.documentElement.style style.setProperty('--window-top', windowTop) -- GitLab