提交 16897cd8 编写于 作者: L LVB8189

Signed-off-by: LVB8189 <lvbai1@huawei.com>

 Changes to be committed:
上级 320dc995
...@@ -93,11 +93,7 @@ isLocked(): boolean; ...@@ -93,11 +93,7 @@ isLocked(): boolean;
**示例** **示例**
```js ```js
screenlock.isLocked().then((data) => { var isLocked = screenlock.isLocked();
console.log('isLocked success: data -> ${JSON.stringify(data)}');
}).catch((err) => {
console.error('isLocked fail:err -> ${JSON.stringify(err)}');
});
``` ```
...@@ -180,11 +176,7 @@ isSecure(): boolean; ...@@ -180,11 +176,7 @@ isSecure(): boolean;
**示例** **示例**
```js ```js
screenlock.isSecure().then((data) => { var isSecure = screenlock.isSecure();
console.log('isSecure success: data -> ${JSON.stringify(data)}');
}).catch((err) => {
console.error('isSecure fail:err -> ${JSON.stringify(err)}');
});
``` ```
......
...@@ -118,11 +118,7 @@ getColorsSync(wallpaperType: WallpaperType): Arrayy&lt;RgbaColory&lt;; ...@@ -118,11 +118,7 @@ getColorsSync(wallpaperType: WallpaperType): Arrayy&lt;RgbaColory&lt;;
**示例** **示例**
```js ```js
wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => { var colors = wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
console.log('success to getColors.');
}).catch((err) => {
console.error('failed to getColors because: ' + JSON.stringify(error));
});
``` ```
...@@ -218,11 +214,7 @@ getIdSync(wallpaperType: WallpaperType): number; ...@@ -218,11 +214,7 @@ getIdSync(wallpaperType: WallpaperType): number;
**示例** **示例**
```js ```js
wallpaper.getIdSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => { var id = wallpaper.getIdSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
console.log('success to getIdSync: ' + JSON.stringify(data));
}).catch((err) => {
console.error('failed to getIdSync because: ' + JSON.stringify(error));
});
## wallpaper.getMinHeight ## wallpaper.getMinHeight
...@@ -304,11 +296,7 @@ getMinHeightSync(): number ...@@ -304,11 +296,7 @@ getMinHeightSync(): number
**示例:** **示例:**
```js ```js
wallpaper.getMinHeightSync().then((data) => { var minHeight = wallpaper.getMinHeightSync();
console.log(`success to getMinHeightSync: ` + JSON.stringify(data));
}).catch((error) => {
console.error(`failed to getMinHeightSync because: ` + JSON.stringify(error));
});
``` ```
...@@ -391,11 +379,7 @@ getMinWidthSync(): number ...@@ -391,11 +379,7 @@ getMinWidthSync(): number
**示例:** **示例:**
```js ```js
wallpaper.getMinWidthSync().then((data) => { var minWidth = wallpaper.getMinWidthSync();
console.log(`success to getMinWidthSync: ` + JSON.stringify(data));
}).catch((error) => {
console.error(`failed to getMinWidthSync because: ` + JSON.stringify(error));
});
``` ```
...@@ -478,11 +462,7 @@ isChangeAllowed(): boolean ...@@ -478,11 +462,7 @@ isChangeAllowed(): boolean
**示例:** **示例:**
```js ```js
wallpaper.isChangeAllowed().then((data) => { var isChangeAllowed = wallpaper.isChangeAllowed();
console.log(`success to isChangeAllowed: ` + JSON.stringify(data));
}).catch((error) => {
console.error(`failed to isChangeAllowed because: ` + JSON.stringify(error));
});
``` ```
...@@ -565,11 +545,7 @@ isUserChangeAllowed(): boolean ...@@ -565,11 +545,7 @@ isUserChangeAllowed(): boolean
**示例:** **示例:**
```js ```js
wallpaper.isUserChangeAllowed().then((data) => { var isUserChangeAllowed = wallpaper.isUserChangeAllowed();
console.log(`success to isUserChangeAllowed: ` + JSON.stringify(data));
}).catch((error) => {
console.error(`failed to isUserChangeAllowed because: ` + JSON.stringify(error));
});
``` ```
...@@ -1034,11 +1010,7 @@ getFileSync(wallpaperType: WallpaperType): number; ...@@ -1034,11 +1010,7 @@ getFileSync(wallpaperType: WallpaperType): number;
**示例:** **示例:**
```js ```js
wallpaper.getFileSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => { var file = wallpaper.getFileSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
console.log(`success to getFileSync: ` + JSON.stringify(data));
}).catch((error) => {
console.error(`failed to getFileSync because: ` + JSON.stringify(error));
});
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册