Package Exports
- @wedevlt/v-jsoneditor
- @wedevlt/v-jsoneditor/dist/v-jsoneditor.min.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wedevlt/v-jsoneditor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
v-jsoneditor
Vue JSONEditor
Try the demo
https://yansenlei.github.io/VJsoneditor/

Installation
npm install v-jsoneditorUsing
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