未验证 提交 6bfe9665 编写于 作者: O openharmony_ci 提交者: Gitee

!5693 示例代码修改

Merge pull request !5693 from 孙悦/OpenHarmony-3.1-Release
......@@ -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.
先完成此消息的编辑!
想要评论请 注册