From 44cc99e684e5e409bf6d816203421806444a65f8 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Tue, 7 Jan 2025 15:47:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(x-web):=20UniPage=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20safeArea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-h5/src/x/framework/setup/page.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/uni-h5/src/x/framework/setup/page.ts b/packages/uni-h5/src/x/framework/setup/page.ts index 29471e9c98f..abd249e475f 100644 --- a/packages/uni-h5/src/x/framework/setup/page.ts +++ b/packages/uni-h5/src/x/framework/setup/page.ts @@ -21,7 +21,7 @@ import { import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router' import { isDialogPageInstance } from '../helpers/utils' import { getWindowInfo } from '../../../service/api/device/getWindowInfo' -import type { SafeArea, SafeAreaInsets } from '@dcloudio/uni-app-x/types/uni' +import type { UniSafeAreaInsets } from '@dcloudio/uni-app-x/types/native/UniSafeAreaInsets' let escBackPageNum = 0 type PageStyle = { @@ -49,10 +49,7 @@ class UniPageImpl implements UniPage { get innerHeight(): number { return getWindowInfo().windowHeight } - get safeArea(): SafeArea { - return getWindowInfo().safeArea - } - get safeAreaInsets(): SafeAreaInsets { + get safeAreaInsets(): UniSafeAreaInsets { return getWindowInfo().safeAreaInsets } getPageStyle(): UTSJSONObject {