1.0.2 • Published 1 year ago

json-tree-view-vue3 v1.0.2

Weekly downloads
47
License
MIT
Repository
github
Last release
1 year ago

json-tree-view-vue3

npm version TypeScript npm bundle size License: MIT code style: prettier

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

PropsRequiredParam TypeDefault valueDescription
jsontruestringJSON string to display the tree
rootKeyfalsestring"/"Top root-level name
maxDepthfalsenumber1The depth of the tree that will be open when rendered
colorSchemefalsestring"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