未验证 提交 31c55724 编写于 作者: O openharmony_ci 提交者: Gitee

!20673 剪贴板资料优化

Merge pull request !20673 from zzs110/master
......@@ -1300,7 +1300,7 @@ setData(data: PasteData, callback: AsyncCallback<void>): void
**示例:**
```js
let pasteData = pasteboard.createPlainTextData('content');
let pasteData = pasteboard.createData(pasteboard.MIMETYPE_TEXT_PLAIN, 'content');
let systemPasteboard = pasteboard.getSystemPasteboard();
systemPasteboard.setData(pasteData, (err, data) => {
if (err) {
......@@ -1343,7 +1343,7 @@ setData(data: PasteData): Promise<void>
**示例:**
```js
let pasteData = pasteboard.createPlainTextData('content');
let pasteData = pasteboard.createData(pasteboard.MIMETYPE_TEXT_PLAIN, 'content');
let systemPasteboard = pasteboard.getSystemPasteboard();
systemPasteboard.setData(pasteData).then((data) => {
console.info('Succeeded in setting PasteData.');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册