未验证 提交 4b3f1881 编写于 作者: 葛亚芳 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-window.md.

Signed-off-by: Nge-yafang <geyafang@huawei.com>
Signed-off-by: N葛亚芳 <geyafang@huawei.com>
上级 8bda788b
...@@ -1373,7 +1373,8 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac ...@@ -1373,7 +1373,8 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac
**示例:** **示例:**
```js ```js
var names = ["status", "navigation"]; // 此处以不显示导航栏、状态栏为例
var names = [];
windowClass.setSystemBarEnable(names, (err, data) => { windowClass.setSystemBarEnable(names, (err, data) => {
if (err.code) { 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 visible. Cause:' + JSON.stringify(err));
...@@ -1406,7 +1407,8 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise&lt;void&gt; ...@@ -1406,7 +1407,8 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise&lt;void&gt;
**示例:** **示例:**
```js ```js
var names = ["status", "navigation"]; // 此处以不显示导航栏、状态栏为例
var names = [];
let promise = windowClass.setSystemBarEnable(names); let promise = windowClass.setSystemBarEnable(names);
promise.then((data)=> { 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 visible. Data: ' + JSON.stringify(data));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册