1.0.2 • Published 1 year ago
json-tree-view-vue3 v1.0.2
json-tree-view-vue3
A Vue3 component that displays JSON in a collapsible tree. Inspired by vue-json-component and vue-json-tree-view to work with Vue3 and TypeScript.
Example
<script setup lang="ts">
import { JsonTreeView } from "json-tree-view-vue3";
import 'json-tree-view-vue3/dist/style.css'
const json = `{"string":"text","number":123,"boolean":true,"null":null,"array":["A","B","C"],"object":{"prop1":"value1","nestedObject":{"prop2":"value2"}}}`
</script>
<template>
<JsonTreeView :json="json" :maxDepth="3" />
</template>
Props
Props | Required | Param Type | Default value | Description |
---|---|---|---|---|
json | true | string | JSON string to display the tree | |
rootKey | false | string | "/" | Top root-level name |
maxDepth | false | number | 1 | The depth of the tree that will be open when rendered |
colorScheme | false | string | "light" | "light" or "dark" can be used. |
Events
- selected(event:
{key: string, value: PrimitiveTypes, path: string}
]
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
0.3.0
2 years ago
0.3.1
2 years ago
0.2.3
2 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.2.2
3 years ago
0.1.16
4 years ago
0.1.15
4 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.4
5 years ago
0.1.5
5 years ago
0.1.2
5 years ago
0.1.3
5 years ago
0.1.0
5 years ago
0.1.1
5 years ago
0.0.1-security
5 years ago