replace json viewer

This commit is contained in:
liangping
2023-09-14 11:49:56 +08:00
parent 7643ebce55
commit fbbeb21803
6 changed files with 76 additions and 7 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import DonutChart from '@/components/charts/DonutChart.vue';
import { computed, ref } from '@vue/reactivity';
import { onMounted } from 'vue';
import { Icon } from '@iconify/vue';
import 'vue-json-pretty/lib/styles.css';
import type {
AuthAccount,
Delegation,
+5 -3
View File
@@ -3,8 +3,10 @@ import { useBlockchain, useFormatter } from '@/stores';
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
import { computed, ref } from '@vue/reactivity';
import type { Tx, TxResponse } from '@/types';
import JsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css';
import { JsonViewer } from "vue3-json-viewer"
// if you used v1.0.5 or latster ,you should add import "vue3-json-viewer/dist/index.css"
import "vue3-json-viewer/dist/index.css";
const props = defineProps(['hash', 'chain']);
@@ -102,7 +104,7 @@ const messages = computed(() => {
<div v-if="tx.tx_response" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
<h2 class="card-title truncate mb-2">JSON</h2>
<JsonPretty :data="tx" :deep="3" />
<JsonViewer :value="tx" copyable boxed sort expand-depth="5"/>
</div>
</div>
</template>