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

!5692 示例代码修改

Merge pull request !5692 from 孙悦/master
...@@ -914,7 +914,7 @@ on(type: 'update', callback: () =>void ): void ...@@ -914,7 +914,7 @@ on(type: 'update', callback: () =>void ): void
```js ```js
var systemPasteboard = pasteboard.getSystemPasteboard(); var systemPasteboard = pasteboard.getSystemPasteboard();
var listener = ()=>{ var listener = () => {
console.info('The system pasteboard has changed'); console.info('The system pasteboard has changed');
}; };
systemPasteboard.on('update', listener); systemPasteboard.on('update', listener);
...@@ -938,6 +938,9 @@ off(type: 'update', callback?: () =>void ): void ...@@ -938,6 +938,9 @@ off(type: 'update', callback?: () =>void ): void
**示例** **示例**
```js ```js
let listener = () => {
console.info('The system pasteboard has changed');
};
systemPasteboard.off('update', listener); systemPasteboard.off('update', listener);
``` ```
......
...@@ -606,7 +606,7 @@ getPixelMap(wallpaperType: WallpaperType, callback: AsyncCallback<image.Pixel ...@@ -606,7 +606,7 @@ getPixelMap(wallpaperType: WallpaperType, callback: AsyncCallback<image.Pixel
**示例:** **示例:**
```js ```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 err : ' + JSON.stringify(err));
console.info('wallpaperXTS ===> testGetPixelMapCallbackSystem data : ' + JSON.stringify(data)); 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.
先完成此消息的编辑!
想要评论请 注册