diff --git a/products/phone/src/main/ets/pages/Index.ets b/products/phone/src/main/ets/pages/Index.ets index 4bf30d5a59b940b86c71f9acda2c74ee1afb5909..a3f241f28d5c84d36601fc90c042cb0b533650c4 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)