File tree Expand file tree Collapse file tree
documentation/docs/tutorial/03-Customization Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1726,3 +1726,40 @@ import { MixedChart } from '@/afcl'
17261726 </div >
17271727</div >
17281728
1729+ ## Json Viever
1730+
1731+ ``` ts
1732+ import { JsonViever } from ' @/afcl'
1733+ ```
1734+
1735+ ### Basic
1736+
1737+ <div class =" split-screen " >
1738+
1739+ <div >
1740+ ``` html
1741+ <JsonViewer
1742+ :value =" [
1743+ {
1744+ id: 1,
1745+ name: 'Alice',
1746+ meta: {
1747+ age: 30,
1748+ hobbies: ['reading', 'biking'],
1749+ }
1750+ },
1751+ {
1752+ id: 2,
1753+ name: 'Bob',
1754+ }
1755+ ]"
1756+ :expandDepth =" 2"
1757+ />
1758+ ```
1759+ </div >
1760+ <div >
1761+ 
1762+ </div >
1763+ </div >
1764+
1765+
Original file line number Diff line number Diff line change 55 :expandDepth =" expandDepth"
66 copyable
77 sort
8+ :theme =" currentTheme"
89 />
910</template >
1011
1112<script setup lang="ts">
13+ import { computed } from ' vue'
1214import { JsonViewer } from ' vue3-json-viewer'
15+ import { useCoreStore } from ' @/stores/core'
1316
1417defineProps <{
1518 value: any
1619 expandDepth? : number
1720}>()
1821
22+ const coreStore = useCoreStore ()
23+
24+ const currentTheme = computed (() => (coreStore .theme === ' dark' ? ' dark' : ' light' ))
1925 </script >
You can’t perform that action at this time.
0 commit comments