未验证 提交 c0e18735 编写于 作者: X xinking129 提交者: Gitee

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

fix file
Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 c03d73c5
......@@ -608,10 +608,10 @@ setStaticSubscriberState(enable: boolean, callback: AsyncCallback<void>): void;
```ts
CommonEventManager.setStaticSubscriberState(true, (err) => {
if (err.code) {
console.info(`Set static subscribe event state callback failed, errCode: ${err.code}, errMes: ${err.message}`);
console.info(`Set static subscriber state callback failed, errCode: ${err.code}, errMes: ${err.message}`);
return;
}
console.info(`Set static subscribe event state callback success`);
console.info(`Set static subscriber state callback success`);
});
```
......@@ -652,8 +652,8 @@ setStaticSubscriberState(enable: boolean): Promise<void>;
```ts
CommonEventManager.setStaticSubscriberState(false).then(() => {
console.info(`Set static subscribe event state promise success`);
console.info(`Set static subscriber state promise success`);
}).catch ((err) => {
console.info(`Set static subscribe event state promise failed, errCode: ${err.code}, errMes: ${err.message}`);
console.info(`Set static subscriber state promise failed, errCode: ${err.code}, errMes: ${err.message}`);
});
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册