From eea9a93ae681af42a1338d44d6f5192ba9097639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=AB=E6=84=81?= Date: Thu, 7 Aug 2025 15:03:34 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97json=E9=A2=84=E8=A7=88=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 47 +++++++++++++++---- src/components/JsonPretty/index.vue | 11 +++-- src/components/JsonPretty/json-them.scss | 43 +++++++++++++++++ .../operation/OperationLogDetailDrawer.vue | 6 ++- 5 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 src/components/JsonPretty/json-them.scss diff --git a/package.json b/package.json index b85127f..663b100 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "vue-demi": "^0.14.10", "vue-draggable-plus": "^0.3.5", "vue-echarts": "^6.5.5", - "vue-json-pretty": "^2.4.0", + "vue-json-viewer": "^3.0.4", "vue-router": "^4.3.3", "vue3-tree-org": "^4.2.2", "xe-utils": "^3.5.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 852e422..8107ec2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,9 +128,9 @@ importers: vue-echarts: specifier: ^6.5.5 version: 6.7.2(@vue/runtime-core@3.5.12)(echarts@5.5.0)(vue@3.5.12(typescript@5.0.4)) - vue-json-pretty: - specifier: ^2.4.0 - version: 2.4.0(vue@3.5.12(typescript@5.0.4)) + vue-json-viewer: + specifier: ^3.0.4 + version: 3.0.4(vue@3.5.12(typescript@5.0.4)) vue-router: specifier: ^4.3.3 version: 4.3.3(vue@3.5.12(typescript@5.0.4)) @@ -1748,6 +1748,9 @@ packages: resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} engines: {node: '>=18'} + clipboard@2.0.11: + resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1998,6 +2001,9 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + delegate@3.2.0: + resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -2757,6 +2763,9 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + good-listener@1.2.2: + resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==} + gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -3960,6 +3969,9 @@ packages: scule@1.3.0: resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + select@1.1.2: + resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==} + semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -4249,6 +4261,9 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + tiny-emitter@2.1.0: + resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + tippy.js@6.3.7: resolution: {integrity: sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==} @@ -4614,11 +4629,10 @@ packages: peerDependencies: eslint: '>=6.0.0' - vue-json-pretty@2.4.0: - resolution: {integrity: sha512-e9bP41DYYIc2tWaB6KuwqFJq5odZ8/GkE6vHQuGcbPn37kGk4a3n1RNw3ZYeDrl66NWXgTlOfS+M6NKkowmkWw==} - engines: {node: '>= 10.0.0', npm: '>= 5.0.0'} + vue-json-viewer@3.0.4: + resolution: {integrity: sha512-pnC080rTub6YjccthVSNQod2z9Sl5IUUq46srXtn6rxwhW8QM4rlYn+CTSLFKXWfw+N3xv77Cioxw7B4XUKIbQ==} peerDependencies: - vue: '>=3.0.0' + vue: ^3.2.2 vue-router@4.3.3: resolution: {integrity: sha512-8Q+u+WP4N2SXY38FDcF2H1dUEbYVHVPtPCPZj/GTZx8RCbiB8AtJP9+YIxn4Vs0svMTNQcLIzka4GH7Utkx9xQ==} @@ -6501,6 +6515,12 @@ snapshots: slice-ansi: 5.0.0 string-width: 7.2.0 + clipboard@2.0.11: + dependencies: + good-listener: 1.2.2 + select: 1.1.2 + tiny-emitter: 2.1.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -6744,6 +6764,8 @@ snapshots: delayed-stream@1.0.0: {} + delegate@3.2.0: {} + dequal@2.0.3: {} devlop@1.1.0: @@ -7653,6 +7675,10 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + good-listener@1.2.2: + dependencies: + delegate: 3.2.0 + gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -8887,6 +8913,8 @@ snapshots: scule@1.3.0: {} + select@1.1.2: {} + semver@5.7.2: {} semver@6.3.1: {} @@ -9203,6 +9231,8 @@ snapshots: text-table@0.2.0: {} + tiny-emitter@2.1.0: {} + tippy.js@6.3.7: dependencies: '@popperjs/core': 2.11.8 @@ -9615,8 +9645,9 @@ snapshots: transitivePeerDependencies: - supports-color - vue-json-pretty@2.4.0(vue@3.5.12(typescript@5.0.4)): + vue-json-viewer@3.0.4(vue@3.5.12(typescript@5.0.4)): dependencies: + clipboard: 2.0.11 vue: 3.5.12(typescript@5.0.4) vue-router@4.3.3(vue@3.5.12(typescript@5.0.4)): diff --git a/src/components/JsonPretty/index.vue b/src/components/JsonPretty/index.vue index 6862d7c..31b8438 100644 --- a/src/components/JsonPretty/index.vue +++ b/src/components/JsonPretty/index.vue @@ -1,13 +1,13 @@