提交 30dc475c 编写于 作者: Z zzs110

剪贴板资料优化

Signed-off-by: Nzzs110 <zhouzishuai@huawei.com>
上级 2989b19d
......@@ -1300,7 +1300,7 @@ setData(data: PasteData, callback: AsyncCallback&lt;void&gt;): 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&lt;void&gt;
**示例:**
```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.
先完成此消息的编辑!
想要评论请 注册