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

!5692 示例代码修改

Merge pull request !5692 from 孙悦/master
......@@ -914,7 +914,7 @@ on(type: 'update', callback: () =>void ): void
```js
var systemPasteboard = pasteboard.getSystemPasteboard();
var listener = ()=>{
var listener = () => {
console.info('The system pasteboard has changed');
};
systemPasteboard.on('update', listener);
......@@ -938,7 +938,10 @@ off(type: 'update', callback?: () =>void ): void
**示例**
```js
systemPasteboard.off('update', listener);
let listener = () => {
console.info('The system pasteboard has changed');
};
systemPasteboard.off('update', listener);
```
......
......@@ -606,7 +606,7 @@ getPixelMap(wallpaperType: WallpaperType, callback: AsyncCallback<image.Pixel
**示例:**
```js
wallpaper.getPixelMap(WALLPAPER_SYSTEM, function (err, data) {
wallpaper.getPixelMap(wallpaper.WallpaperType.WALLPAPER_SYSTEM, function (err, data) {
console.info('wallpaperXTS ===> testGetPixelMapCallbackSystem err : ' + JSON.stringify(err));
console.info('wallpaperXTS ===> testGetPixelMapCallbackSystem data : ' + JSON.stringify(data));
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册