u
This commit is contained in:
parent
11d2e98ef9
commit
5eb2b729ed
@ -581,12 +581,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
copy_to_clipboard (text) {
|
copy_to_clipboard (text, toastLength = 50) {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: text,
|
data: text,
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.hideToast()
|
uni.hideToast()
|
||||||
wo.tt.showToast({ type: wo.c2t.GREEN, title: wo.ll({ zhCN: `已成功拷贝到剪贴板\n${text}`, enUS: `Successfully copied to clipboard\n${text}` }) })
|
wo.tt.showToast({
|
||||||
|
type: wo.c2t.GREEN,
|
||||||
|
title: `${wo.ll({ zhCN: '已成功拷贝到剪贴板', enUS: 'Successfully copied to clipboard ' })}\n${String(text).substring(0, toastLength)}`,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user