From 823f45e1fc1f548151d87affbf0cd9be513808b4 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 16 Apr 2019 10:13:47 +0800 Subject: [PATCH] refine --- src/components/JsonEditor/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/JsonEditor/index.vue b/src/components/JsonEditor/index.vue index e19ad683..07b282e4 100644 --- a/src/components/JsonEditor/index.vue +++ b/src/components/JsonEditor/index.vue @@ -16,6 +16,7 @@ import 'codemirror/addon/lint/json-lint' export default { name: 'JsonEditor', + /* eslint-disable vue/require-prop-types */ props: ['value'], data() { return { @@ -24,8 +25,8 @@ export default { }, watch: { value(value) { - const editor_value = this.jsonEditor.getValue() - if (value !== editor_value) { + const editorValue = this.jsonEditor.getValue() + if (value !== editorValue) { this.jsonEditor.setValue(JSON.stringify(this.value, null, 2)) } }