未验证 提交 c497eccc 编写于 作者: O openharmony_ci 提交者: Gitee

!4273 【OpenHarmony开源贡献者计划2022】EventHub相关格式及表达问题

Merge pull request !4273 from king_he/0523-h
# EventHub
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>
> **NOTE**<br>
> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......@@ -34,10 +34,10 @@ Subscribes to an event.
**Parameters**
| Name| Type| Mandatory| Description |
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name. |
| callback | Function | Yes| Callback invoked when the event is triggered. |
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| event | string | Yes | Event name. |
| callback | Function | Yes | Callback invoked when the event is triggered. |
**Example**
......@@ -72,10 +72,10 @@ Unsubscribes from an event. If **callback** is specified, this API unsubscribes
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name. |
| callback | Function | No | Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed. |
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| event | string | Yes | Event name. |
| callback | Function | No | Callback for the event. If **callback** is unspecified, all callbacks of the event are unsubscribed. |
**Example**
......@@ -110,10 +110,10 @@ Triggers an event.
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| event | string | Yes| Event name. |
| ...args | Object[] | Yes| Variable parameters, which are passed to the callback when the event is triggered. |
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| event | string | Yes | Event name. |
| ...args | Object[] | Yes | Variable parameters, which are passed to the callback when the event is triggered. |
**Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册