diff --git a/zh-cn/application-dev/reference/apis/js-apis-window.md b/zh-cn/application-dev/reference/apis/js-apis-window.md index 1051cf2f086c4b9201ab11a3d76100cbfb355314..71c88010136e51e950b1418029b1be997d3ddad7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -2466,28 +2466,28 @@ getUIContext(): UIContext import UIAbility from '@ohos.app.ability.UIAbility'; export default class EntryAbility extends UIAbility { - onWindowStageCreate(windowStage) { - // 为主窗å£åŠ è½½å¯¹åº”çš„ç›®æ ‡é¡µé¢ã€‚ - windowStage.loadContent("pages/page2", (err) => { - if (err.code) { - console.error('Failed to load the content. Cause:' + JSON.stringify(err)); - return; - } - console.info('Succeeded in loading the content.'); - }); - // 获å–应用主窗å£ã€‚ - let windowClass = null; - windowStage.getMainWindow((err, data) => { - if (err.code) { - console.error('Failed to obtain the main window. Cause: ' + JSON.stringify(err)); - return; - } - windowClass = data; - console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); - // 获å–UIContext实例。 - globalThis.uiContext = windowClass.getUIContext(); - }) - } + onWindowStageCreate(windowStage) { + // 为主窗å£åŠ è½½å¯¹åº”çš„ç›®æ ‡é¡µé¢ã€‚ + windowStage.loadContent("pages/page2", (err) => { + if (err.code) { + console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + return; + } + console.info('Succeeded in loading the content.'); + // 获å–应用主窗å£ã€‚ + let windowClass = null; + windowStage.getMainWindow((err, data) => { + if (err.code) { + console.error('Failed to obtain the main window. Cause: ' + JSON.stringify(err)); + return; + } + windowClass = data; + console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); + // 获å–UIContext实例。 + globalThis.uiContext = windowClass.getUIContext(); + }) + }); + } }; ``` @@ -5466,7 +5466,7 @@ setFullScreen(isFullScreen: boolean, callback: AsyncCallback<void>): void > **说明:** > -> 从 API version 6开始支æŒï¼Œä»ŽAPI version 9开始废弃,推è使用[setWindowSystemBarEnable()](#setwindowsystembarenable9)。 +> 从 API version 6开始支æŒï¼Œä»ŽAPI version 9开始废弃,推èè”åˆä½¿ç”¨[setWindowSystemBarEnable()](#setwindowsystembarenable9)å’Œ[setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9)实现全å±ã€‚ **系统能力:** SystemCapability.WindowManager.WindowManager.Core @@ -5500,7 +5500,7 @@ setFullScreen(isFullScreen: boolean): Promise<void> > **说明:** > -> 从 API version 6开始支æŒï¼Œä»ŽAPI version 9开始废弃,推è使用[setWindowSystemBarEnable()](#setwindowsystembarenable9-1)。 +> 从 API version 6开始支æŒï¼Œä»ŽAPI version 9开始废弃,推èè”åˆä½¿ç”¨[setWindowSystemBarEnable()](#setwindowsystembarenable9-1)å’Œ[setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9-1)实现全å±ã€‚ **系统能力:** SystemCapability.WindowManager.WindowManager.Core