From 51f48adea33fc2461fee4802203227744559e321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=89=AC?= Date: Wed, 29 Oct 2025 15:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(index):=20=E4=BF=AE=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- products/phone/src/main/ets/pages/Index.ets | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/products/phone/src/main/ets/pages/Index.ets b/products/phone/src/main/ets/pages/Index.ets index 4bf30d5..a3f241f 100644 --- a/products/phone/src/main/ets/pages/Index.ets +++ b/products/phone/src/main/ets/pages/Index.ets @@ -20,23 +20,24 @@ import { VideoDetail } from '@ohos/videoDetail/src/main/ets/view/VideoDetail'; @Entry @Component struct Index { + @StorageLink('windowUtil') windowUtil: WindowUtil | undefined = undefined; @Provide('pageInfo') pageInfo: VideoNavPathStack = new VideoNavPathStack(); aboutToDisappear(): void { - let windowUtil: WindowUtil | undefined = WindowUtil.getInstance(); - windowUtil!.offWindowSizeChange(); + // let windowUtil: WindowUtil | undefined = WindowUtil.getInstance(); + // windowUtil!.offWindowSizeChange(); } @Builder PageMap(name: string) { if (name === CommonConstants.PAGE_NAMES[1]) { - VideoDetail() + VideoDetail({ mainWindowInfo: this.windowUtil?.mainWindowInfo }) } } build() { Navigation(this.pageInfo) { - Home() + Home({ mainWindowInfo: this.windowUtil?.mainWindowInfo }) } .mode(NavigationMode.Stack) .navDestination(this.PageMap) -- Gitee