|
|
@ -863,15 +863,17 @@ export default { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const el = document.createElement('textarea') |
|
|
|
this.$clipboard(JSON.stringify(this.projectTemplate, null, 2)) |
|
|
|
el.value = JSON.stringify(this.projectTemplate, null, 2) |
|
|
|
|
|
|
|
debugger |
|
|
|
// const el = document.createElement('textarea') |
|
|
|
el.setAttribute('readonly', '') |
|
|
|
// el.value = JSON.stringify(this.projectTemplate, null, 2) |
|
|
|
el.style = { position: 'absolute', left: '-9999px' } |
|
|
|
// debugger |
|
|
|
document.body.appendChild(el) |
|
|
|
// el.setAttribute('readonly', '') |
|
|
|
el.select() |
|
|
|
// el.style = { position: 'absolute', left: '-9999px' } |
|
|
|
document.execCommand('copy') |
|
|
|
// document.body.appendChild(el) |
|
|
|
document.body.removeChild(el) |
|
|
|
// el.select() |
|
|
|
|
|
|
|
// document.execCommand('copy') |
|
|
|
|
|
|
|
// document.body.removeChild(el) |
|
|
|
this.$toast.success('Successfully copied JSON data to clipboard!').goAway(3000) |
|
|
|
this.$toast.success('Successfully copied JSON data to clipboard!').goAway(3000) |
|
|
|
return true |
|
|
|
return true |
|
|
|
}, |
|
|
|
}, |
|
|
|