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

!5694 示例代码修改

Merge pull request !5694 from 孙悦/OpenHarmony-3.2-Beta1
......@@ -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,6 +938,9 @@ off(type: 'update', callback?: () =>void ): void
**示例**
```js
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.
先完成此消息的编辑!
想要评论请 注册