提交 431d48c7 编写于 作者: D DCloud_LXH

chore(h5): setClipboardData

上级 1097cd02
...@@ -64,8 +64,8 @@ function _setClipboardData(data: string, resolve: Function, reject: Function) { ...@@ -64,8 +64,8 @@ function _setClipboardData(data: string, resolve: Function, reject: Function) {
textarea.style.zIndex = '-9999' textarea.style.zIndex = '-9999'
document.body.appendChild(textarea) document.body.appendChild(textarea)
textarea.value = data textarea.value = data
textarea.focus()
textarea.select() textarea.select()
textarea.setSelectionRange(0, textarea.value.length)
const result = document.execCommand('Copy', false) const result = document.execCommand('Copy', false)
textarea.blur() textarea.blur()
if (result) { if (result) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册