vue-json-editable-lili2
v1.2.1
Published
a json editable package
Downloads
2
Readme
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>