未验证 提交 8f7288f3 编写于 作者: N ningning 提交者: Gitee

导入模块规范化

Signed-off-by: Nningning <wangningning14@huawei.com>
上级 a36cf0d1
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册