未验证 提交 f75ad3c2 编写于 作者: O openharmony_ci 提交者: Gitee

!23100 【轻量级 PR】:导入模块规范化

Merge pull request !23100 from ningning/N/A
......@@ -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.
先完成此消息的编辑!
想要评论请 注册