my.setClipboard
Set the clipboard data.
Sample Code
copy
Page({
data: {
text: '3.1415926',
copy: '',
},
handleCopy() {
my.setClipboard({
text: this.data.text,
});
},
});
Parameters
Name | Type | Mandatory | Description |
text | String | Yes | Clipboard data |
success | Function | No | Callback function upon call success |
fail | Function | No | Callback function upon call failure |
complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure) |