From 7209b4193b93e79ff355b9620371baa8bdb16129 Mon Sep 17 00:00:00 2001 From: chouchouji <1305974212@qq.com> Date: Fri, 29 May 2026 17:03:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(h5):=20=E4=BF=AE=E5=A4=8D=20getSystemInfoSy?= =?UTF-8?q?nc=20API=20windowTop=20=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(question/220141)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-h5/src/service/api/device/getWindowInfo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/uni-h5/src/service/api/device/getWindowInfo.ts b/packages/uni-h5/src/service/api/device/getWindowInfo.ts index 8bbce7c04d..fd27854878 100644 --- a/packages/uni-h5/src/service/api/device/getWindowInfo.ts +++ b/packages/uni-h5/src/service/api/device/getWindowInfo.ts @@ -31,7 +31,8 @@ export const getWindowInfo = defineSyncApi( height: windowHeight - safeAreaInsets.top - safeAreaInsets.bottom, } - const { top: windowTop, bottom: windowBottom } = getWindowOffset() + const { top, bottom: windowBottom, topWindowHeight } = getWindowOffset() + const windowTop = top + topWindowHeight windowHeight -= windowTop windowHeight -= windowBottom