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

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

change file
Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 9d469c27
...@@ -575,9 +575,9 @@ commonEventManager.removeStickyCommonEvent("sticky_event").then(() => { ...@@ -575,9 +575,9 @@ commonEventManager.removeStickyCommonEvent("sticky_event").then(() => {
}); });
``` ```
## CommonEventManager.setStaticSubscribeEventState<sup>10+</sup> ## CommonEventManager.setStaticSubscriberState<sup>10+</sup>
setStaticSubscribeEventState(enable: boolean, callback: AsyncCallback<void>): void; setStaticSubscriberState(enable: boolean, callback: AsyncCallback<void>): void;
以回调形式为当前应用设置静态订阅事件使能或去使能状态。 以回调形式为当前应用设置静态订阅事件使能或去使能状态。
...@@ -606,7 +606,7 @@ setStaticSubscribeEventState(enable: boolean, callback: AsyncCallback<void>): vo ...@@ -606,7 +606,7 @@ setStaticSubscribeEventState(enable: boolean, callback: AsyncCallback<void>): vo
```ts ```ts
CommonEventManager.setStaticSubscribeEventState(true, (err) => { CommonEventManager.setStaticSubscriberState(true, (err) => {
if (err.code) { if (err.code) {
console.info(`Set static subscribe event state callback failed, errCode: ${err.code}, errMes: ${err.message}`); console.info(`Set static subscribe event state callback failed, errCode: ${err.code}, errMes: ${err.message}`);
return; return;
...@@ -615,9 +615,9 @@ CommonEventManager.setStaticSubscribeEventState(true, (err) => { ...@@ -615,9 +615,9 @@ CommonEventManager.setStaticSubscribeEventState(true, (err) => {
}); });
``` ```
## CommonEventManager.setStaticSubscribeEventState<sup>10+</sup> ## CommonEventManager.setStaticSubscriberState<sup>10+</sup>
setStaticSubscribeEventState(enable: boolean): Promise<void>; setStaticSubscriberState(enable: boolean): Promise<void>;
以Promise形式为当前应用设置静态订阅事件使能或去使能状态。 以Promise形式为当前应用设置静态订阅事件使能或去使能状态。
...@@ -651,7 +651,7 @@ setStaticSubscribeEventState(enable: boolean): Promise<void>; ...@@ -651,7 +651,7 @@ setStaticSubscribeEventState(enable: boolean): Promise<void>;
```ts ```ts
CommonEventManager.setStaticSubscribeEventState(false).then(() => { CommonEventManager.setStaticSubscriberState(false).then(() => {
console.info(`Set static subscribe event state promise success`); console.info(`Set static subscribe event state promise success`);
}).catch ((err) => { }).catch ((err) => {
console.info(`Set static subscribe event state promise failed, errCode: ${err.code}, errMes: ${err.message}`); console.info(`Set static subscribe event state promise failed, errCode: ${err.code}, errMes: ${err.message}`);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册