From e18dcf461015bf9d8f80545e94184f70c72f138c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=9B=E4=BA=9A=E8=8A=B3?= Date: Tue, 16 Aug 2022 13:14:58 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/apis/js-apis-window.md. Signed-off-by: ge-yafang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 葛亚芳 --- .../reference/apis/js-apis-window.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 7ec2efca53..70c133ded9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-window.md +++ b/zh-cn/application-dev/reference/apis/js-apis-window.md @@ -1124,13 +1124,14 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac **示例:** ```js -var names = ["status", "navigation"]; +// 此处以不显示导航栏、状态栏为例 +var names = []; windowClass.setSystemBarEnable(names, (err, data) => { if (err.code) { - console.error('Failed to set the system bar to be visible. Cause:' + JSON.stringify(err)); + console.error('Failed to set the system bar to be invisible. Cause:' + JSON.stringify(err)); return; } - console.info('Succeeded in setting the system bar to be visible. Data: ' + JSON.stringify(data)); + console.info('Succeeded in setting the system bar to be invisible. Data: ' + JSON.stringify(data)); }); ``` @@ -1157,12 +1158,13 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise<void> **示例:** ```js -var names = ["status", "navigation"]; +// 此处以不显示导航栏、状态栏为例 +var names = []; let promise = windowClass.setSystemBarEnable(names); promise.then((data)=> { - console.info('Succeeded in setting the system bar to be visible. Data: ' + JSON.stringify(data)); + console.info('Succeeded in setting the system bar to be invisible. Data: ' + JSON.stringify(data)); }).catch((err)=>{ - console.error('Failed to set the system bar to be visible. Cause:' + JSON.stringify(err)); + console.error('Failed to set the system bar to be invisible. Cause:' + JSON.stringify(err)); }); ``` -- GitLab