提交 dbd75caa 编写于 作者: R rcy-hw

update api doc

Signed-off-by: Nrcy-hw <renchunyang@huawei.com>
上级 5611a87b
......@@ -275,6 +275,8 @@ Adds a reminder notification slot. This API uses an asynchronous callback to ret
**Example**
```js
import notification from '@ohos.notification'
let mySlot = {
type: notification.SlotType.SOCIAL_COMMUNICATION
}
......@@ -307,6 +309,8 @@ Adds a reminder notification slot. This API uses a promise to return the result.
**Example**
```js
import notification from '@ohos.notification'
let mySlot = {
type: notification.SlotType.SOCIAL_COMMUNICATION
}
......@@ -334,6 +338,8 @@ Removes a notification slot of a specified type. This API uses an asynchronous c
**Example**
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => {
console.log("removeNotificationSlot callback");
});
......@@ -363,6 +369,8 @@ Removes a notification slot of a specified type. This API uses a promise to retu
**Example**
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => {
console.log("removeNotificationSlot promise");
});
......
......@@ -272,12 +272,11 @@ addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;)
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | 是 | notification&nbsp;slot实例,仅支持设置其type属性。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 异步回调。 |
**说明**
使用NotificationSlot需要导入: import notification from '@ohos.notification'
**示例**
```js
import notification from '@ohos.notification'
let mySlot = {
type: notification.SlotType.SOCIAL_COMMUNICATION
}
......@@ -301,9 +300,6 @@ addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt;
| -------- | -------- | -------- | -------- |
| slot | [NotificationSlot](js-apis-notification.md#notificationslot) | 是 | notification&nbsp;slot实例,仅支持设置其type属性。 |
**说明**
使用NotificationSlot需要导入: import notification from '@ohos.notification'
**返回值**
| 类型 | 说明 |
......@@ -313,6 +309,8 @@ addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt;
**示例**
```js
import notification from '@ohos.notification'
let mySlot = {
type: notification.SlotType.SOCIAL_COMMUNICATION
}
......@@ -340,6 +338,8 @@ removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback&
**示例**
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION, (err, data) => {
console.log("removeNotificationSlot callback");
});
......@@ -369,6 +369,8 @@ removeNotificationSlot(slotType: notification.SlotType): Promise&lt;void&gt;
**示例**
```js
import notification from '@ohos.notification'
reminderAgent.removeNotificationSlot(notification.SlotType.CONTENT_INFORMATION).then(() => {
console.log("removeNotificationSlot promise");
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册