Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
f20de4cd
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f20de4cd
编写于
6月 30, 2022
作者:
X
xuzhihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix issue of Notification
Signed-off-by:
N
xuzhihao
<
xuzhihao16@huawei.com
>
上级
c134e861
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
373 addition
and
335 deletion
+373
-335
zh-cn/application-dev/reference/apis/js-apis-commonEvent.md
zh-cn/application-dev/reference/apis/js-apis-commonEvent.md
+162
-154
zh-cn/application-dev/reference/apis/js-apis-emitter.md
zh-cn/application-dev/reference/apis/js-apis-emitter.md
+13
-7
zh-cn/application-dev/reference/apis/js-apis-notification.md
zh-cn/application-dev/reference/apis/js-apis-notification.md
+196
-174
zh-cn/application-dev/reference/apis/js-apis-reminderAgent.md
...n/application-dev/reference/apis/js-apis-reminderAgent.md
+2
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-commonEvent.md
浏览文件 @
f20de4cd
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-emitter.md
浏览文件 @
f20de4cd
...
...
@@ -20,12 +20,14 @@ import emitter from '@ohos.events.emitter'
用于表示事件被投递的优先级。
**系统能力**
: 以下各项对应的系统能力均为 SystemCapability.Notification.Emitter
| 名称 | 值 | 说明 |
| --------- | ---- | ------------------------------------------------- |
| IMMEDIATE | 0 | 表示事件被立即投递。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| HIGH | 1 | 表示事件先于LOW优先级投递。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| LOW | 2 | 表示事件优于IDLE优先级投递,事件的默认优先级是LOW。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| IDLE | 3 | 表示在没有其他事件的情况下,才投递该事件。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| IMMEDIATE | 0 | 表示事件被立即投递。 |
| HIGH | 1 | 表示事件先于LOW优先级投递。 |
| LOW | 2 | 表示事件优于IDLE优先级投递,事件的默认优先级是LOW。
|
| IDLE | 3 | 表示在没有其他事件的情况下,才投递该事件。
|
## emitter.on
...
...
@@ -135,15 +137,19 @@ emitter.emit(innerEvent, eventData);
进程内的事件。
**系统能力**
: 以下各项对应的系统能力均为 SystemCapability.Notification.Emitter
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | ------------------------------- | ---- | ---- | ---------------------------------- |
| eventId | number | 是 | 是 | 事件的ID,由开发者定义用来辨别事件。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| priority |
[
EventPriority
](
#eventpriority
)
| 是 | 是 | 事件被投递的优先级。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| eventId | number | 是 | 是 | 事件的ID,由开发者定义用来辨别事件。 |
| priority |
[
EventPriority
](
#eventpriority
)
| 是 | 是 | 事件被投递的优先级。 |
## EventData
发送事件时传递的数据。
**系统能力**
: 以下各项对应的系统能力均为 SystemCapability.Notification.Emitter
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ---- | ------------------ | ---- | ---- | -------------- |
| data | [key: string]: any | 是 | 是 | 发送事件时传递的数据,数据类型支持字符串、整型和布尔型。
<br/>
**系统能力**
: SystemCapability.Notification.Emitter
|
| data | [key: string]: any | 是 | 是 | 发送事件时传递的数据,数据类型支持字符串、整型和布尔型。 |
zh-cn/application-dev/reference/apis/js-apis-notification.md
浏览文件 @
f20de4cd
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-reminderAgent.md
浏览文件 @
f20de4cd
...
...
@@ -50,6 +50,8 @@ publishReminder(reminderReq: ReminderRequest): Promise<number>
发布一个后台代理提醒,使用Promise方式实现异步调用。
**需要权限**
: ohos.permission.PUBLISH_AGENT_REMINDER
**系统能力**
: SystemCapability.Notification.ReminderAgent
**参数**
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录