v-jsoneditor
v-jsoneditor
Vue JSONEditor
Try the demo
https://yansenlei.github.io/VJsoneditor/

Installation
npm install v-jsoneditor
Using
Import globally
import Vue from 'vue'
import VJsoneditor from 'v-jsoneditor'
Vue.use(VJsoneditor)
Import
import VJsoneditor from 'v-jsoneditor'
export default {
name: 'app',
components: {
VJsoneditor
},
data() {
return {
json: {
"hello": "vue"
}
}
},
methods: {
onError() {
console.log('error')
}
}
}
Browser
<script src='https://unpkg.com/vue@latest'></script>
<script src="./dist/v-jsoneditor.min.js"></script>
Use in template
<v-jsoneditor v-model="json" :options="options" :plus="false" height="400px" @error="onError">
Options
| Name | Description | type | default |
|---|---|---|---|
| options | Jsoneditor params, You can look at the detailed configuration | Object | { mode: 'code' } |
| value(v-model) | Object value | Object | { } |
| plus | Whether full screen switching is added | Boolean | true |
| height | Default height | String | - |
Events
| Name | Description |
|---|---|
| error | Error callback |
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
Related Packages
json-schema-editor-vue3
A json-schema editor of high efficient and easy-to-use, base on Vue3
26,921
92
json-schema-editor-vue
A json-schema editor of high efficient and easy-to-use, base on Vue
3,215
311
Version History
| Version | Released | License |
|---|---|---|
| 1.4.5 | MIT | |
| 1.4.4 | MIT | |
| 1.4.3 | MIT | |
| 1.4.2 | MIT | |
| 1.4.1 | MIT | |
| 1.4.0 | MIT | |
| 1.3.0 | MIT | |
| 1.2.3 | MIT | |
| 1.2.2 | MIT | |
| 1.2.1 | MIT | |
| 1.2.0 | MIT | |
| 1.1.6 | MIT | |
| 1.1.5 | MIT | |
| 1.1.4 | MIT | |
| 1.1.3 | MIT | |
| 1.1.2 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.18 | MIT | |
| 1.0.17 | MIT | |
| 1.0.16 | MIT | |
| 1.0.15 | MIT | |
| 1.0.14 | MIT | |
| 1.0.13 | MIT | |
| 1.0.12 | MIT | |
| 1.0.11 | MIT | |
| 1.0.10 | MIT | |
| 1.0.9 | MIT | |
| 1.0.8 | MIT | |
| 1.0.7 | MIT |
Showing the latest 30 of 37. See every release on npm