From d6653f72e812e15bb8a163cd58a7138f9ae226b8 Mon Sep 17 00:00:00 2001 From: WX1377357 Date: Tue, 13 May 2025 15:35:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=9F=E5=BC=83api=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 3e51a75..e7da554 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -37,7 +37,7 @@ struct Index { private webWidth: number = 0; private webHeight: number = 0; private windowClass: window.Window | null = null; - private context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext; + private context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; private manager: WebDownloadManager = WebDownloadManager.getInstance(); private ctx: UIContext = this.getUIContext(); private options: promptAction.BaseDialogOptions = { -- Gitee