io.vertigo.ui.static.js.v-components.v-json-editor.js Maven / Gradle / Ivy
Vue.component('v-json-editor', {
template :
' '
+' '
+' '
+ ' '
+' {{value}}'
+' '
+' '
+' '
,
props : {
value: { type: String, required: true},
readonly : { type: Boolean, required: true },
cols : { type: Number, 'default': 2 }
},
data : function () {
return {
jsonAsObject : JSON.parse(this.$props.value)
}
},
watch: {
value: function(newVal, oldVal) {
this.$data.jsonAsObject = JSON.parse(newVal);
}
},
methods: {
updateJson() {
this.$emit('input', JSON.stringify(this.$data.jsonAsObject));
}
}
})
© 2015 - 2025 Weber Informatics LLC | Privacy Policy