未验证 提交 18be8c66 编写于 作者: 葛亚芳 提交者: 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>
上级 7a80aaa3
......@@ -1558,10 +1558,10 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac
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));
});
```
......@@ -1592,9 +1592,9 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise&lt;void&gt;
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));
});
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册