From 8f7288f3546117451260d1803812e09c5a01dabb Mon Sep 17 00:00:00 2001 From: ningning Date: Sat, 26 Aug 2023 04:01:59 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E5=9D=97=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ningning --- .../js-apis-WorkSchedulerExtensionAbility.md | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md index 337f7f8bfb..6b01338735 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md @@ -12,7 +12,6 @@ ```ts import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'; -import workScheduler from '@ohos.resourceschedule.workScheduler'; ``` ## 属性 @@ -40,11 +39,13 @@ onWorkStart(work: workScheduler.WorkInfo): void **示例:** ```ts - export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { - onWorkStart(workInfo: workScheduler.WorkInfo) { - console.log('MyWorkSchedulerExtensionAbility onWorkStart' + JSON.stringify(workInfo)); - } + import workScheduler from '@ohos.resourceschedule.workScheduler'; + + export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { + onWorkStart(workInfo: workScheduler.WorkInfo) { + console.log('MyWorkSchedulerExtensionAbility onWorkStart' + JSON.stringify(workInfo)); } + } ``` ## WorkSchedulerExtensionAbility.onWorkStop @@ -65,9 +66,11 @@ onWorkStop(work: workScheduler.WorkInfo): void **示例:** ```ts - export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { - onWorkStop(workInfo: workScheduler.WorkInfo) { - console.log('MyWorkSchedulerExtensionAbility onWorkStop' + JSON.stringify(workInfo)); - } + import workScheduler from '@ohos.resourceschedule.workScheduler'; + + export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { + onWorkStop(workInfo: workScheduler.WorkInfo) { + console.log('MyWorkSchedulerExtensionAbility onWorkStop' + JSON.stringify(workInfo)); } + } ``` \ No newline at end of file -- GitLab