fix: update default content style

This commit is contained in:
yanglbme 2020-05-31 17:43:54 +08:00
parent 7f3db24d05
commit 0feac00ea8
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,8 @@ const mutations = {
state.output = output state.output = output
}, },
clearEditorToDefault(state) { clearEditorToDefault(state) {
state.editor.setValue(DEFAULT_CONTENT) const doc = formatDoc(DEFAULT_CONTENT)
state.editor.setValue(doc)
state.cssEditor.setValue(DEFAULT_CSS_CONTENT) state.cssEditor.setValue(DEFAULT_CSS_CONTENT)
} }
} }

View File

@ -120,7 +120,6 @@ export default {
if (this.changeTimer) clearTimeout(this.changeTimer); if (this.changeTimer) clearTimeout(this.changeTimer);
this.changeTimer = setTimeout(() => { this.changeTimer = setTimeout(() => {
this.onEditorRefresh() this.onEditorRefresh()
console.log('tick');
saveEditorContent(this.editor, '__editor_content') saveEditorContent(this.editor, '__editor_content')
}, 300); }, 300);
}); });