md
This commit is contained in:
parent
e9b23a3ae8
commit
a705cd3b17
@ -939,14 +939,11 @@ export default {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
// navigator clipboard 向剪贴板写文本
|
||||
this.$modal.msgSuccess('复制成功')
|
||||
console.log("==...123=9=>",this.currentSelectStr)
|
||||
return navigator.clipboard.writeText(this.currentSelectStr)
|
||||
} else {
|
||||
// 创建text area
|
||||
const textArea = document.createElement('textarea')
|
||||
textArea.value = this.currentSelectStr
|
||||
console.log("==...123=9000=>",textArea.value)
|
||||
|
||||
// 使text area不在viewport,同时设置不可见
|
||||
document.body.appendChild(textArea)
|
||||
textArea.focus()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user