From 060c476f9c7b01b985cb158fbc548f0bb3c99f1a Mon Sep 17 00:00:00 2001 From: xuzhihao Date: Tue, 12 Jul 2022 15:40:46 +0800 Subject: [PATCH] Fix issues of Notification docs Signed-off-by: xuzhihao --- .../reference/apis/js-apis-notification.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-notification.md b/zh-cn/application-dev/reference/apis/js-apis-notification.md index 3684393fab..8d95c5db9e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notification.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notification.md @@ -2924,7 +2924,7 @@ function enableSlotCallback(err) { Notification.enableNotificationSlot( { bundle: "ohos.samples.notification", }, - notify.SlotType.SOCIAL_COMMUNICATION, + Notification.SlotType.SOCIAL_COMMUNICATION, true, enableSlotCallback); ``` @@ -2953,7 +2953,7 @@ enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean): P //enableNotificationSlot Notification.enableNotificationSlot( { bundle: "ohos.samples.notification", }, - notify.SlotType.SOCIAL_COMMUNICATION, + Notification.SlotType.SOCIAL_COMMUNICATION, true).then(() => { console.log('====================>enableNotificationSlot====================>'); }); @@ -2961,7 +2961,7 @@ Notification.enableNotificationSlot( ## Notification.isNotificationSlotEnabled 9+ -isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback): void +isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback\): void 获取指定类型的渠道使能状态(Callback形式)。 @@ -2975,7 +2975,7 @@ isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncC | -------- | ----------------------------- | ---- | ---------------------- | | bundle | [BundleOption](#bundleoption) | 是 | 指定包信息。 | | type | [SlotType](#slottype) | 是 | 指定渠道类型。 | -| callback | AsyncCallback\ | 是 | 设定渠道使能回调函数。 | +| callback | AsyncCallback\ | 是 | 设定渠道使能回调函数。 | **示例:** @@ -2987,13 +2987,13 @@ function getEnableSlotCallback(err, data) { Notification.isNotificationSlotEnabled( { bundle: "ohos.samples.notification", }, - notify.SlotType.SOCIAL_COMMUNICATION, + Notification.SlotType.SOCIAL_COMMUNICATION, getEnableSlotCallback); ``` ## Notification.isNotificationSlotEnabled 9+ -isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise +isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise\ 获取指定类型的渠道使能状态(Promise形式)。 @@ -3014,8 +3014,8 @@ isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise { + Notification.SlotType.SOCIAL_COMMUNICATION + ).then((data) => { console.log('====================>isNotificationSlotEnabled====================>'); }); ``` -- GitLab