From 36798739a36b4752b091ba18a5b3ea39781bf7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B5=8B=E5=B2=A9?= Date: Sat, 24 May 2025 16:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 苏嵋岩 --- .../reference/apis-arkui/js-apis-window-sys.md | 2 +- .../reference/apis-arkui/js-apis-window.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-window-sys.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-window-sys.md index ca72b4560a5..da53968cbe6 100644 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-window-sys.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-window-sys.md @@ -3120,7 +3120,7 @@ export default class EntryAbility extends UIAbility { windowStage.getMainWindow().then( data => { mainWindow = data; - console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); + console.info(`Succeeded in obtaining the main window. Data: ${JSON.stringify(data)}`); // 调用setTitleButtonVisible接口,隐藏主窗标题栏最大化、最小化、分屏按钮。 mainWindow.setTitleButtonVisible(false, false, false); } diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-window.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-window.md index 1de3cc8d095..3fe76be06a9 100644 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-window.md @@ -1133,7 +1133,7 @@ export default class EntryAbility extends UIAbility { let windowClass = windowStage.getMainWindowSync(); let properties = windowClass.getWindowProperties(); window.getWindowsByCoordinate(properties.displayId).then((data) => { - console.info('Succeeded in creating the subwindow. Data: ' + JSON.stringify(data)); + console.info(`Succeeded in creating the subwindow. Data: ${JSON.stringify(data)}`); for (let window of data) { // do something with window } @@ -1141,7 +1141,7 @@ export default class EntryAbility extends UIAbility { console.error(`Failed to get window from point. Cause code: ${err.code}, message: ${err.message}`); }); window.getWindowsByCoordinate(properties.displayId, 2, 500, 500).then((data) => { - console.info('Succeeded in creating the subwindow. Data: ' + JSON.stringify(data)); + console.info(`Succeeded in creating the subwindow. Data: ${JSON.stringify(data)}`); for (let window of data) { // do something with window } @@ -5510,7 +5510,7 @@ on(type: 'windowTitleButtonRectChange', callback: Callback<TitleButtonRect> windowClass.setUIContent('pages/WindowPage').then(() => { try { windowClass?.on('windowTitleButtonRectChange', (titleButtonRect) => { - console.info('Succeeded in enabling the listener for window title buttons area changes. Data: ' + JSON.stringify(titleButtonRect)); + console.info(`Succeeded in enabling the listener for window title buttons area changes. Data: ${JSON.stringify(titleButtonRect)}`); }); } catch (exception) { console.error(`Failed to enable the listener for window title buttons area changes. Cause code: ${exception.code}, message: ${exception.message}`); @@ -8296,7 +8296,7 @@ export default class EntryAbility extends UIAbility { buttonBackgroundCornerRadius: 4 }; windowClass.setDecorButtonStyle(style); - console.info('Succeeded in setting the style of button. Data: ' + JSON.stringify(style)); + console.info(`Succeeded in setting the style of button. Data: ${JSON.stringify(style)}`); }); } catch (exception) { console.error(`Failed to set the style of button. Cause code: ${exception.code}, message: ${exception.message}`); @@ -8339,7 +8339,7 @@ getDecorButtonStyle(): DecorButtonStyle ```ts try { let decorButtonStyle = windowClass.getDecorButtonStyle(); - console.info('Succeeded in getting the style of button. Data: ' + JSON.stringify(decorButtonStyle)); + console.info(`Succeeded in getting the style of button. Data: ${JSON.stringify(decorButtonStyle)}`); } catch (exception) { console.error(`Failed to get the style of button. Cause code: ${exception.code}, message: ${exception.message}`); } @@ -8431,7 +8431,7 @@ export default class EntryAbility extends UIAbility { windowClass = data; try { let titleButtonArea = windowClass.getTitleButtonRect(); - console.info('Succeeded in obtaining the area of title buttons. Data: ' + JSON.stringify(titleButtonArea)); + console.info(`Succeeded in obtaining the area of title buttons. Data: ${JSON.stringify(titleButtonArea)}`); } catch (exception) { console.error(`Failed to get the area of title buttons. Cause code: ${exception.code}, message: ${exception.message}`); } @@ -8667,7 +8667,7 @@ try { let windowClass: window.Window = window.findWindow("subWindow"); let parentWindow: window.Window = windowClass.getParentWindow(); let properties = parentWindow.getWindowProperties(); - console.info('Succeeded in obtaining parent window properties. Property: ' + JSON.stringify(properties)); + console.info(`Succeeded in obtaining parent window properties. Property: ${JSON.stringify(properties)}`); } catch (exception) { console.error(`Failed to get the parent window. Cause code: ${exception.code}, message: ${exception.message}`); } @@ -8721,7 +8721,7 @@ export default class EntryAbility extends UIAbility { windowStage.getMainWindow().then( data => { mainWindow = data; - console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); + console.info(`Succeeded in obtaining the main window. Data: ${JSON.stringify(data)}`); // 调用setWindowTitleButtonVisible接口,隐藏主窗标题栏最大化、最小化、关闭按钮。 mainWindow.setWindowTitleButtonVisible(false, false, false); } -- Gitee