v-jsoneditor

vue use jsoneditor
680,398 182
Install
npm install v-jsoneditor
Latest Version:1.4.5
Vue:2
License:MIT
Last Updated:Dec 24, 2024
Links: GitHub  ·  npm
Maintainer: leiys

npm version Build Status license license

v-jsoneditor

Vue JSONEditor

Try the demo

https://yansenlei.github.io/VJsoneditor/

demo

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

@wedevlt/v-jsoneditor

vue use jsoneditor

3,349 182
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