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:
+2
-1
@@ -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
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user