v-json-tree
Vue.js 3.0 JSON tree viewer
2,357
16
| Install | |
|---|---|
npm install v-json-tree |
|
| Latest Version: | 3.0.4 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Jan 3, 2023 |
| Links: | GitHub · npm |
Maintainer: mikemenaker
vue-json-tree
Vue.js JSON tree viewer component
Demo:
https://jsfiddle.net/mikemenaker/8zxwavrk/
Installation
With npm:
npm i v-json-tree --save
With a CDN:
<!-- In <body>, after Vue import -->
<script type="text/javascript" src="https://unpkg.com/v-json-tree/dist/vJsonTree.umd.js"></script>
Usage
With an ES6 bundler (via npm)
In your component file
import vJsonTree from "v-json-tree";
Then register:
components: {
vJsonTree
},
With a CDN
<script>
Vue.component("v-json-tree", vJsonTree);
new Vue({
// ...
})
</script>
Props:
- data <Object/Array> - Data to format into tree
- filterKey
- fullMarkup
Slots:
- hide - What should be used for the hide button
- expand - What should be used for the expand button
- more - What should be used for the elipsis when an object/array is hidden
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 3.0.4 | ^2.6.10 | MIT | |
| 3.0.3 | ^2.6.10 | MIT | |
| 3.0.2 | ^2.6.10 | ||
| 3.0.1 | ^2.6.10 | ||
| 3.0.0 | ^2.3.3 | MIT | |
| 2.0.0 | ^2.3.3 | MIT | |
| 0.0.1 | ^2.3.3 | MIT |