1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-10 12:50:38 +08:00
This commit is contained in:
Pan 2018-08-19 16:26:15 +08:00
parent 7389dbbbb8
commit d4e07e357c

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="json-editor"> <div class="json-editor">
<textarea ref="textarea"></textarea> <textarea ref="textarea"/>
</div> </div>
</template> </template>
@ -16,12 +16,13 @@ import 'codemirror/addon/lint/json-lint'
export default { export default {
name: 'JsonEditor', name: 'JsonEditor',
/* eslint-disable vue/require-prop-types */
props: ['value'],
data() { data() {
return { return {
jsonEditor: false jsonEditor: false
} }
}, },
props: ['value'],
watch: { watch: {
value(value) { value(value) {
const editor_value = this.jsonEditor.getValue() const editor_value = this.jsonEditor.getValue()