vue-json-editable-lily1

1.1.10 • Public • Published

vue-json-editable

Visual JSON Editor built as an vue component. Provides a basic GUI

开始

npm install vue-json-editable --save

使用

//import it in your project At your entry point

import Vue from 'vue'
import JsonEditor from 'vue-json-editable'
  
Vue.use(JsonEditor)

参数

  • objData: json data
  • options
    • confirmText: strings of the confirm button
    • cancelText: strings of the cancel button
  • event
    • key click event
    • value click event

样例

<template>
    <JsonEditor
        :options="{
            confirmText: '确认',
            cancelText: '取消',
        }"
        @keyEvent="keyEvent"
        @valEvent="valEvent"
        :objData="jsonData" 
        v-model="jsonData" >
    </JsonEditor>
</template>
<script>
export default {
    ...
    data: function() {
        return {
            jsonData: {
                name: 'Bill',
                age: 23,
                city: 'Seattle'
            }
        }
    }
}
</script> 

/vue-json-editable-lily1/

    Package Sidebar

    Install

    npm i vue-json-editable-lily1

    Weekly Downloads

    1

    Version

    1.1.10

    License

    MIT

    Unpacked Size

    150 kB

    Total Files

    39

    Last publish

    Collaborators

    • lily_user