From bdd95111c144ea08e73a54cd14bfa88db014425b Mon Sep 17 00:00:00 2001 From: JimQing Date: Sat, 6 Jun 2020 10:35:11 +0800 Subject: [PATCH] fix: reset complete --- src/components/codeMirror/header.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/codeMirror/header.vue b/src/components/codeMirror/header.vue index df83af9..4143738 100644 --- a/src/components/codeMirror/header.vue +++ b/src/components/codeMirror/header.vue @@ -15,7 +15,7 @@ - + @@ -216,9 +216,6 @@ export default { } }, // 重置页面 - reset() { - this.showResetConfirm = true; - }, confirmReset() { localStorage.clear() this.clearEditorToDefault(); @@ -229,6 +226,9 @@ export default { this.colorChanged(this.config.colorOption[1].value) this.sizeChanged(this.config.sizeOption[2].value) this.$emit('cssChanged') + this.selectFont = this.currentFont; + this.selectSize = this.currentSize; + this.selectColor = this.currentColor; this.showResetConfirm = false; }, cancelReset() { @@ -250,9 +250,9 @@ export default { 'setHtml', 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions']) }, mounted() { - this.selectFont = this.currentFont - this.selectSize = this.currentSize - this.selectColor = this.currentColor + this.selectFont = this.currentFont; + this.selectSize = this.currentSize; + this.selectColor = this.currentColor; } }