2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-17 19:21:24 +03:00

fix: copy issue

This commit is contained in:
风棋
2021-05-16 15:28:02 +08:00
parent 054b4089c7
commit 160b1d77ad
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
<template>
<div :class="jvClass">
<div ref="viewer" :class="jvClass">
<div
v-if="copyable"
:class="`jv-tooltip ${copyText.align || 'right'}`"
@@ -131,6 +131,7 @@ export default {
}
if (this.copyable) {
const clipBoard = new Clipboard(this.$refs.clip, {
container: this.$refs.viewer,
text: () => {
return JSON.stringify(this.value, null, 2)
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vue-json-viewer",
"version": "2.2.18",
"version": "2.2.19",
"description": "vuejs展示json的组件",
"main": "vue-json-viewer.js",
"files": [