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