From 79d3ad4a15ab78765a877c917ab81104c8d499b3 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Fri, 26 Aug 2022 11:33:56 +0800 Subject: [PATCH] doc modify Signed-off-by: fangJinliang1 Change-Id: I1620d5f20badbc88c423f7ff71f8db1d3aab5e9a --- .../reference/apis/js-apis-notification.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 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 cdbdbd1149..cdf786c406 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notification.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notification.md @@ -3035,9 +3035,9 @@ Notification.isNotificationSlotEnabled( ``` -## Notification.setSyncNotificationEnabledForUninstallApp9+ +## Notification.setSyncNotificationEnabledWithoutApp9+ -setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean, callback: AsyncCallback\): void +setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback\): void 设置是否将通知同步到未安装应用程序的设备(callback形式)。 @@ -3061,17 +3061,17 @@ setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean, callb let userId = 100; let enable = true; -function setSyncNotificationEnabledForUninstallAppCallback(err) { - console.log('setSyncNotificationEnabledForUninstallAppCallback'); +function setSyncNotificationEnabledWithoutAppCallback(err) { + console.log('setSyncNotificationEnabledWithoutAppCallback'); } -Notification.setSyncNotificationEnabledForUninstallApp(userId, enable, setSyncNotificationEnabledForUninstallAppCallback); +Notification.setSyncNotificationEnabledWithoutApp(userId, enable, setSyncNotificationEnabledWithoutAppCallback); ``` -## Notification.setSyncNotificationEnabledForUninstallApp9+ +## Notification.setSyncNotificationEnabledWithoutApp9+ -setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean): Promise\ +setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise\ 设置是否将通知同步到未安装应用程序的设备(Promise形式)。 @@ -3094,19 +3094,19 @@ setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean): Prom let userId = 100; let enable = true; -Notification.setSyncNotificationEnabledForUninstallApp(userId, enable) +Notification.setSyncNotificationEnabledWithoutApp(userId, enable) .then((data) => { - console.log('setSyncNotificationEnabledForUninstallApp, data:', data); + console.log('setSyncNotificationEnabledWithoutApp, data:', data); }) .catch((err) => { - console.log('setSyncNotificationEnabledForUninstallApp, err:', err); + console.log('setSyncNotificationEnabledWithoutApp, err:', err); }); ``` -## Notification.getSyncNotificationEnabledForUninstallApp9+ +## Notification.getSyncNotificationEnabledWithoutApp9+ -getSyncNotificationEnabledForUninstallApp(userId: number, callback: AsyncCallback\): void +getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback\): void 获取是否同步通知到未安装应用程序的设备的结果(callback形式)。 @@ -3128,17 +3128,17 @@ getSyncNotificationEnabledForUninstallApp(userId: number, callback: AsyncCallbac ```js let userId = 100; -function getSyncNotificationEnabledForUninstallAppCallback(err, data) { - console.log('getSyncNotificationEnabledForUninstallAppCallback, data: ', data); +function getSyncNotificationEnabledWithoutAppCallback(err, data) { + console.log('getSyncNotificationEnabledWithoutAppCallback, data: ', data); } -Notification.getSyncNotificationEnabledForUninstallApp(userId, getSyncNotificationEnabledForUninstallAppCallback); +Notification.getSyncNotificationEnabledWithoutApp(userId, getSyncNotificationEnabledWithoutAppCallback); ``` -## Notification.getSyncNotificationEnabledForUninstallApp9+ +## Notification.getSyncNotificationEnabledWithoutApp9+ -getSyncNotificationEnabledForUninstallApp(userId: number): Promise\ +getSyncNotificationEnabledWithoutApp(userId: number): Promise\ 获取是否同步通知到未安装应用程序的设备的结果(Promise形式)。 @@ -3165,12 +3165,12 @@ getSyncNotificationEnabledForUninstallApp(userId: number): Promise\ ```js let userId = 100; -Notification.getSyncNotificationEnabledForUninstallApp(userId) +Notification.getSyncNotificationEnabledWithoutApp(userId) .then((data) => { - console.log('getSyncNotificationEnabledForUninstallApp, data: ', data); + console.log('getSyncNotificationEnabledWithoutApp, data: ', data); }) .catch((err) => { - console.log('getSyncNotificationEnabledForUninstallApp, err: ', err); + console.log('getSyncNotificationEnabledWithoutApp, err: ', err); }); ``` -- GitLab