Gathering detailed insights and metrics for @dangojs/vue3-json-editor
Gathering detailed insights and metrics for @dangojs/vue3-json-editor
Gathering detailed insights and metrics for @dangojs/vue3-json-editor
Gathering detailed insights and metrics for @dangojs/vue3-json-editor
A jsoneditor of vue 3 (next) - (fork vue-json-editor)
npm install @dangojs/vue3-json-editor
Typescript
Module System
Node Version
NPM Version
JavaScript (98.15%)
CSS (1.34%)
TypeScript (0.25%)
Vue (0.19%)
HTML (0.06%)
Built with Next.js • Fully responsive • SEO optimized • Open source ready
Total Downloads
934
Last Day
1
Last Week
7
Last Month
23
Last Year
415
ISC License
43 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Sep 13, 2022
Latest Version
0.0.2
Package Id
@dangojs/vue3-json-editor@0.0.2
Unpacked Size
7.50 MB
Size
1.61 MB
File Count
11
NPM Version
8.5.0
Node Version
16.14.2
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
600%
7
Compared to previous week
Last Month
64.3%
23
Compared to previous month
Last Year
76.6%
415
Compared to previous year
3
43
(fork vue-json-editor - credits original: https://github.com/dirkliu/vue-json-editor)
(fork vue3-json-editor - joaomede: https://github.com/joaomede/vue3-json-editor)
A json editor of vue.js
1# install 2npm install 3 4# for vue 3.x app 5npm run dev 6 7# for vite 3.x 8npm run dev_vite
v-model:bind the [json object]
:show-btns: boolean, show the save button, default: true
:expandedOnStart: boolean, expand the JSON editor on start for the modes 'tree', 'view', and 'form', default: false
:mode: string, default: tree
:lang: string, default: en
@json-change: on json changed
@json-save: on json save
@has-error: on error
npm install vue3-json-editor --save
1<template> 2 <div> 3 <p>vue-json-editor</p> 4 <Vue3JsonEditor 5 v-model="json" 6 :show-btns="true" 7 :expandedOnStart="true" 8 @json-change="onJsonChange" 9 /> 10 </div> 11</template> 12 13<script> 14import { defineComponent, reactive, toRefs } from 'vue' 15import { Vue3JsonEditor } from 'vue3-json-editor' 16 17export default defineComponent({ 18 components: { 19 Vue3JsonEditor 20 }, 21 setup () { 22 function onJsonChange (value) { 23 console.log('value:', value) 24 } 25 26 const state = reactive({ 27 json: {} 28 }) 29 30 return { 31 ...toRefs(state), 32 onJsonChange 33 } 34 } 35}) 36</script>
1<template> 2 <Vue3JsonEditor v-model="json" :show-btns="true" @json-change="onJsonChange"/> 3</template> 4 5<script lang="ts"> 6import { defineComponent, reactive, toRefs } from 'vue' 7import { Vue3JsonEditor } from '../dist/vue3-json-editor.esm' 8 9export default defineComponent({ 10 name: 'App', 11 components: { 12 Vue3JsonEditor 13 }, 14 setup () { 15 function onJsonChange () { 16 // 17 } 18 19 const state = reactive({ 20 json: {} 21 }) 22 23 return { 24 ...toRefs(state), 25 onJsonChange 26 } 27 } 28}) 29</script> 30 31<style> 32#app { 33 font-family: Avenir, Helvetica, Arial, sans-serif; 34 -webkit-font-smoothing: antialiased; 35 -moz-osx-font-smoothing: grayscale; 36 text-align: center; 37 color: #2c3e50; 38 margin-top: 60px; 39} 40</style>
No vulnerabilities found.