mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-23 20:40:38 +03:00
fix: copy issue
This commit is contained in:
+2
-1
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="jvClass">
|
<div ref="viewer" :class="jvClass">
|
||||||
<div
|
<div
|
||||||
v-if="copyable"
|
v-if="copyable"
|
||||||
:class="`jv-tooltip ${copyText.align || 'right'}`"
|
:class="`jv-tooltip ${copyText.align || 'right'}`"
|
||||||
@@ -131,6 +131,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.copyable) {
|
if (this.copyable) {
|
||||||
const clipBoard = new Clipboard(this.$refs.clip, {
|
const clipBoard = new Clipboard(this.$refs.clip, {
|
||||||
|
container: this.$refs.viewer,
|
||||||
text: () => {
|
text: () => {
|
||||||
return JSON.stringify(this.value, null, 2)
|
return JSON.stringify(this.value, null, 2)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-json-viewer",
|
"name": "vue-json-viewer",
|
||||||
"version": "2.2.18",
|
"version": "2.2.19",
|
||||||
"description": "vuejs展示json的组件",
|
"description": "vuejs展示json的组件",
|
||||||
"main": "vue-json-viewer.js",
|
"main": "vue-json-viewer.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
Reference in New Issue
Block a user