From 0feac00ea8fa0401df6a1857e45c7a29271e6416 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Sun, 31 May 2020 17:43:54 +0800 Subject: [PATCH] fix: update default content style --- src/store/index.js | 3 ++- src/view/CodemirrorEditor.vue | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index b2779af..6bfc516 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -145,7 +145,8 @@ const mutations = { state.output = output }, clearEditorToDefault(state) { - state.editor.setValue(DEFAULT_CONTENT) + const doc = formatDoc(DEFAULT_CONTENT) + state.editor.setValue(doc) state.cssEditor.setValue(DEFAULT_CSS_CONTENT) } } diff --git a/src/view/CodemirrorEditor.vue b/src/view/CodemirrorEditor.vue index f26c302..d15d100 100644 --- a/src/view/CodemirrorEditor.vue +++ b/src/view/CodemirrorEditor.vue @@ -120,7 +120,6 @@ export default { if (this.changeTimer) clearTimeout(this.changeTimer); this.changeTimer = setTimeout(() => { this.onEditorRefresh() - console.log('tick'); saveEditorContent(this.editor, '__editor_content') }, 300); });