提交 6be7b2f8 编写于 作者: L LVB8189

modify

Signed-off-by: NLVB8189 <lvbai1@huawei.com>
上级 772d41d3
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
> **说明:** > **说明:**
> >
> 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> >
> 本模块接口仅可在FA模型下使用。 > 本模块接口仅可在FA模型下使用。
> >
> 本模块接口均为系统接口。 > 本模块接口均为系统接口。
## 导入模块 ## 导入模块
...@@ -34,10 +34,11 @@ onCreate(want: object): void ...@@ -34,10 +34,11 @@ onCreate(want: object): void
```js ```js
import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility'; import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility';
class WallpaperExt extends WallpaperExtensionAbility { class WallpaperExt extends WallpaperExtensionAbility {
onCreate(want) { onCreate(want) {
console.log('onCreate, want:' + want.abilityName); console.log('onCreate, want:' + want.abilityName);
} }
} }
``` ```
...@@ -59,10 +60,11 @@ onWallpaperChange(wallpaperType: number): void ...@@ -59,10 +60,11 @@ onWallpaperChange(wallpaperType: number): void
```js ```js
import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility'; import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility';
class WallpaperExt extends WallpaperExtensionAbility { class WallpaperExt extends WallpaperExtensionAbility {
onWallpaperChange(wallpaperType) { onWallpaperChange(wallpaperType) {
console.log('onWallpaperChange, wallpaperType:' + wallpaperType); console.log('onWallpaperChange, wallpaperType:' + wallpaperType);
} }
} }
``` ```
...@@ -78,9 +80,10 @@ onDestroy(): void ...@@ -78,9 +80,10 @@ onDestroy(): void
```js ```js
import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility'; import WallpaperExtensionAbility from '@ohos.WallpaperExtensionAbility';
class WallpaperExt extends WallpaperExtensionAbility { class WallpaperExt extends WallpaperExtensionAbility {
onDestroy() { onDestroy() {
console.log('onDestroy'); console.log('onDestroy');
} }
} }
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册