fix:修改原生复制function为插件复制
This commit is contained in:
@@ -392,15 +392,9 @@ export default {
|
|||||||
element.click()
|
element.click()
|
||||||
},
|
},
|
||||||
copyValue () {
|
copyValue () {
|
||||||
const domUrl = document.createElement('input')
|
this.$copyText(this.fileContent).then(() => {
|
||||||
domUrl.value = this.fileContent
|
this.$message.success({ message: this.$t('overall.copySuccess') })
|
||||||
domUrl.id = 'creatDom'
|
})
|
||||||
document.body.appendChild(domUrl)
|
|
||||||
domUrl.select() // 选择对象
|
|
||||||
document.execCommand('Copy') // 执行浏览器复制命令
|
|
||||||
const creatDom = document.getElementById('creatDom')
|
|
||||||
creatDom.parentNode.removeChild(creatDom)
|
|
||||||
this.$message.success(this.$t('overall.copySuccess'))
|
|
||||||
},
|
},
|
||||||
initEvent () {
|
initEvent () {
|
||||||
bus.$on('profile-dialog', () => {
|
bus.$on('profile-dialog', () => {
|
||||||
|
|||||||
@@ -1439,15 +1439,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
copyValue () {
|
copyValue () {
|
||||||
const domUrl = document.createElement('input')
|
this.$copyText(this.configsCopyValue).then(() => {
|
||||||
domUrl.value = this.configsCopyValue
|
this.$message.success({ message: this.$t('overall.copySuccess') })
|
||||||
domUrl.id = 'creatDom'
|
})
|
||||||
document.body.appendChild(domUrl)
|
|
||||||
domUrl.select() // 选择对象
|
|
||||||
document.execCommand('Copy') // 执行浏览器复制命令
|
|
||||||
const creatDom = document.getElementById('creatDom')
|
|
||||||
creatDom.parentNode.removeChild(creatDom)
|
|
||||||
this.$message.success(this.$t('overall.copySuccess'))
|
|
||||||
},
|
},
|
||||||
syntaxHighlight (json) {
|
syntaxHighlight (json) {
|
||||||
if (typeof json != 'string') {
|
if (typeof json != 'string') {
|
||||||
|
|||||||
@@ -1423,15 +1423,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
copyValue () {
|
copyValue () {
|
||||||
const domUrl = document.createElement('input')
|
this.$copyText(this.configsCopyValue).then(() => {
|
||||||
domUrl.value = this.configsCopyValue
|
this.$message.success({ message: this.$t('overall.copySuccess') })
|
||||||
domUrl.id = 'creatDom'
|
})
|
||||||
document.body.appendChild(domUrl)
|
|
||||||
domUrl.select() // 选择对象
|
|
||||||
document.execCommand('Copy') // 执行浏览器复制命令
|
|
||||||
const creatDom = document.getElementById('creatDom')
|
|
||||||
creatDom.parentNode.removeChild(creatDom)
|
|
||||||
this.$message.success(this.$t('overall.copySuccess'))
|
|
||||||
},
|
},
|
||||||
copyLogsValue (index) {
|
copyLogsValue (index) {
|
||||||
const domUrl = document.createElement('input')
|
const domUrl = document.createElement('input')
|
||||||
|
|||||||
@@ -384,15 +384,9 @@ export default {
|
|||||||
element.click()
|
element.click()
|
||||||
},
|
},
|
||||||
copyValue () {
|
copyValue () {
|
||||||
const domUrl = document.createElement('input')
|
this.$copyText(this.fileContent).then(() => {
|
||||||
domUrl.value = this.fileContent
|
this.$message.success({ message: this.$t('overall.copySuccess') })
|
||||||
domUrl.id = 'creatDom'
|
})
|
||||||
document.body.appendChild(domUrl)
|
|
||||||
domUrl.select() // 选择对象
|
|
||||||
document.execCommand('Copy') // 执行浏览器复制命令
|
|
||||||
const creatDom = document.getElementById('creatDom')
|
|
||||||
creatDom.parentNode.removeChild(creatDom)
|
|
||||||
this.$message.success(this.$t('overall.copySuccess'))
|
|
||||||
},
|
},
|
||||||
fileClosed () {
|
fileClosed () {
|
||||||
this.personalCenter()
|
this.personalCenter()
|
||||||
|
|||||||
Reference in New Issue
Block a user