tencent cloud

Tencent Cloud Super App as a Service

ドキュメントTencent Cloud Super App as a Service

Clipboard

Download
フォーカスモード
フォントサイズ
最終更新日: 2025-04-10 18:18:36

setClipboardData

This API is used via wx.setClipboardData(Object object).
Feature Description: Sets the content of the system clipboard. For individual users, it should not be invoked more than once per second.
Parameter and Description: Object.
Attribute
Type
Default value
Required
Description
data
string
-
Yes
Clipboard content
success
function
-
No
Callback Function of Successful Interface Call
fail
function
-
No
Callback Function of Failing Interface Call
complete
function
-
No
Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations)
Sample Code
wx.setClipboardData({
data: 'data',
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})

getClipboardData

This API is used via wx.getClipboardData(Object object).
Feature Description: Gets the content of the system clipboard. For individual users, the invocation does not exceed 1 time per second.
Parameter and Description: Object.
Attribute
Type
Default value
Required
Description
success
function
-
No
Callback Function of Successful Interface Call
fail
function
-
No
Callback Function of Failing Interface Call
complete
function
-
No
Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations)
object.success callback function: Object.
Attribute
Type
Description
data
string
Clipboard content
Sample Code
wx.getClipboardData({
success(res) {
console.log(res.data)
}
})


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック