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 ca72b4560a5dde568b0c4c73324ab026e2482708..da53968cbe64b159d94922c8ff5d265bb1ce9457 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 1de3cc8d09540f1c2e2a2f35d8195e3d3b253666..3fe76be06a9d8ae596985f6f0f52db1a2edc52ed 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); }