Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
fac8dfd7
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
未验证
提交
fac8dfd7
编写于
9月 06, 2023
作者:
O
openharmony_ci
提交者:
Gitee
9月 06, 2023
浏览文件
操作
浏览文件
下载
差异文件
!23618 文档纠正与补充
Merge pull request !23618 from XKK/month
08151111
上级
62f4a499
b5545b5e
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
49 addition
and
48 deletion
+49
-48
zh-cn/application-dev/reference/apis/js-apis-inner-notification-notificationRequest.md
...ce/apis/js-apis-inner-notification-notificationRequest.md
+37
-37
zh-cn/application-dev/reference/apis/js-apis-inner-notification-notificationSorting.md
...ce/apis/js-apis-inner-notification-notificationSorting.md
+5
-5
zh-cn/application-dev/reference/apis/js-apis-notificationManager.md
...ication-dev/reference/apis/js-apis-notificationManager.md
+1
-0
zh-cn/application-dev/reference/apis/js-apis-notificationSubscribe.md
...ation-dev/reference/apis/js-apis-notificationSubscribe.md
+6
-6
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-inner-notification-notificationRequest.md
浏览文件 @
fac8dfd7
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Notification.Notification
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Notification.Notification
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
|
---------------------
| --------------------------------------------- | --- |-----------------------------------------------------------------------|
|
-------------------------------
| --------------------------------------------- | --- |-----------------------------------------------------------------------|
| content |
[
NotificationContent
](
js-apis-inner-notification-notificationContent.md#notificationcontent
)
| 是 | 通知内容。 |
| content |
[
NotificationContent
](
js-apis-inner-notification-notificationContent.md#notificationcontent
)
| 是 | 通知内容。 |
| id | number | 否 | 通知ID。 |
| id | number | 否 | 通知ID。 |
| slotType |
[
SlotType
](
js-apis-notificationManager.md#slottype
)
| 否 | 通道类型。 |
| slotType |
[
SlotType
](
js-apis-notificationManager.md#slottype
)
| 否 | 通道类型。 |
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
| classification | string | 否 | 通知分类。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| classification | string | 否 | 通知分类。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| groupName
<sup>
8+
<sup>
| string | 否 | 组通知名称。 |
| groupName
<sup>
8+
<sup>
| string | 否 | 组通知名称。 |
| template
<sup>
8+
<sup>
|
[
NotificationTemplate
](
./js-apis-inner-notification-notificationTemplate.md
)
| 否 | 通知模板。 |
| template
<sup>
8+
<sup>
|
[
NotificationTemplate
](
./js-apis-inner-notification-notificationTemplate.md
)
| 否 | 通知模板。 |
| isRemoveAllowed
<sup>
10+
<sup>
| boolean | 否 | 通知是否能被移除(点击通知下方删除按钮无法删除,左滑不出现删除按钮)。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| isRemoveAllowed
<sup>
8+
<sup>
| boolean | 否 | 通知是否能被移除(点击通知下方删除按钮无法删除,左滑不出现删除按钮)。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| source
<sup>
8+
<sup>
| number | 否 | 通知源。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| source
<sup>
8+
<sup>
| number | 否 | 通知源。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| distributedOption
<sup>
8+
<sup>
|
[
DistributedOptions
](
#distributedoptions
)
| 否 | 分布式通知的选项。 |
| distributedOption
<sup>
8+
<sup>
|
[
DistributedOptions
](
#distributedoptions
)
| 否 | 分布式通知的选项。 |
| deviceId
<sup>
8+
<sup>
| string | 否 | 通知源的deviceId。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
| deviceId
<sup>
8+
<sup>
| string | 否 | 通知源的deviceId。
<br>
**系统API**
: 此接口为系统接口,三方应用不支持调用。 |
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-notification-notificationSorting.md
浏览文件 @
fac8dfd7
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
**系统接口**
: 以下为系统接口,三方应用不支持调用。
**系统接口**
: 以下为系统接口,三方应用不支持调用。
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
|
-------------------- | --------------------- | --- | ------------------------------------------
|
|
---------| --------------------- | --- |------------------------
|
| slot |
[
NotificationSlot
](
js-apis-inner-notification-notificationSlot.md
)
| 是 | 通道类型。 |
| slot |
[
NotificationSlot
](
js-apis-inner-notification-notificationSlot.md
)
| 是 | 通道类型。 |
|
level
| number | 是 | 通知级别,不设置则根据通知渠道类型有默认值。 |
|
ranking
| number | 是 | 通知级别,不设置则根据通知渠道类型有默认值。 |
|
desc | string | 是 | 通知渠道描述信息。
|
|
hashCode | string | 是 | 通知唯一标识。
|
zh-cn/application-dev/reference/apis/js-apis-notificationManager.md
浏览文件 @
fac8dfd7
...
@@ -2977,6 +2977,7 @@ notificationManager.setDistributedEnable(enable).then(() => {
...
@@ -2977,6 +2977,7 @@ notificationManager.setDistributedEnable(enable).then(() => {
});
});
```
```
## notificationManager.requestEnableNotification<sup>10+<sup>
## notificationManager.isDistributedEnabled
## notificationManager.isDistributedEnabled
...
...
zh-cn/application-dev/reference/apis/js-apis-notificationSubscribe.md
浏览文件 @
fac8dfd7
...
@@ -443,9 +443,9 @@ notificationSubscribe.remove(hashCode, reason).then(() => {
...
@@ -443,9 +443,9 @@ notificationSubscribe.remove(hashCode, reason).then(() => {
console
.
info
(
"
remove success
"
);
console
.
info
(
"
remove success
"
);
});
});
```
```
## NotificationSubscribe.remove
## NotificationSubscribe.remove
<sup>10+<sup>
remove(hashCodes: Array
\<
s
tring
\>
, reason: RemoveReason, callback: AsyncCallback
\<
void
\>
): void
remove(hashCodes: Array
\<
S
tring
\>
, reason: RemoveReason, callback: AsyncCallback
\<
void
\>
): void
批量删除指定通知(Callback形式)。
批量删除指定通知(Callback形式)。
...
@@ -459,7 +459,7 @@ remove(hashCodes: Array\<string\>, reason: RemoveReason, callback: AsyncCallback
...
@@ -459,7 +459,7 @@ remove(hashCodes: Array\<string\>, reason: RemoveReason, callback: AsyncCallback
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
|-----------|-------------------------------| ---- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|-----------|-------------------------------| ---- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| hashCodes | Array
\<
s
tring
\>
| 是 | 通知唯一ID数组集合。可以通过
[
onConsume
](
js-apis-inner-notification-notificationSubscriber.md#onConsume
)
回调的入参
[
SubscribeCallbackData
](
js-apis-notification.md#subscribecallbackdata
)
获取其内部
[
NotificationRequest
](
js-apis-inner-notification-notificationRequest.md#notificationrequest
)
对象中的hashCode。 |
| hashCodes | Array
\<
S
tring
\>
| 是 | 通知唯一ID数组集合。可以通过
[
onConsume
](
js-apis-inner-notification-notificationSubscriber.md#onConsume
)
回调的入参
[
SubscribeCallbackData
](
js-apis-notification.md#subscribecallbackdata
)
获取其内部
[
NotificationRequest
](
js-apis-inner-notification-notificationRequest.md#notificationrequest
)
对象中的hashCode。 |
| reason |
[
RemoveReason
](
#removereason
)
| 是 | 通知删除原因。 |
| reason |
[
RemoveReason
](
#removereason
)
| 是 | 通知删除原因。 |
| callback | AsyncCallback
\<
void
\>
| 是 | 删除指定通知回调函数。 |
| callback | AsyncCallback
\<
void
\>
| 是 | 删除指定通知回调函数。 |
...
@@ -489,9 +489,9 @@ let reason = notificationSubscribe.RemoveReason.CANCEL_REASON_REMOVE;
...
@@ -489,9 +489,9 @@ let reason = notificationSubscribe.RemoveReason.CANCEL_REASON_REMOVE;
notificationSubscribe
.
remove
(
hashCodes
,
reason
,
removeCallback
);
notificationSubscribe
.
remove
(
hashCodes
,
reason
,
removeCallback
);
```
```
## NotificationSubscribe.remove
## NotificationSubscribe.remove
<sup>10+<sup>
remove(hashCodes: Array
\<
s
tring
\>
, reason: RemoveReason): Promise
\<
void
\>
remove(hashCodes: Array
\<
S
tring
\>
, reason: RemoveReason): Promise
\<
void
\>
批量删除指定通知(Promise形式)。
批量删除指定通知(Promise形式)。
...
@@ -505,7 +505,7 @@ remove(hashCodes: Array\<string\>, reason: RemoveReason): Promise\<void\>
...
@@ -505,7 +505,7 @@ remove(hashCodes: Array\<string\>, reason: RemoveReason): Promise\<void\>
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
|-----------|-------------------------------| ---- |-------------|
|-----------|-------------------------------| ---- |-------------|
| hashCodes | Array
\<
s
tring
\>
| 是 | 通知唯一ID数组集合。 |
| hashCodes | Array
\<
S
tring
\>
| 是 | 通知唯一ID数组集合。 |
| reason |
[
RemoveReason
](
#removereason
)
| 是 | 通知删除原因。 |
| reason |
[
RemoveReason
](
#removereason
)
| 是 | 通知删除原因。 |
**错误码:**
**错误码:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录