Skip to content

Commit bdd9511

Browse files
committed
fix: reset complete
1 parent fe4d7f2 commit bdd9511

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/components/codeMirror/header.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</el-tooltip>
1616
<!-- 页面重置 -->
1717
<el-tooltip class="header__item" :effect="effect" content="重置页面" placement="bottom-start">
18-
<i class="el-icon-refresh" size="medium" @click="reset"></i>
18+
<i class="el-icon-refresh" size="medium" @click="showResetConfirm = true"></i>
1919
</el-tooltip>
2020
<!-- 插入表格 -->
2121
<el-tooltip class="header__item header__item_last" :effect="effect" content="插入表格" placement="bottom-start">
@@ -216,9 +216,6 @@ export default {
216216
}
217217
},
218218
// 重置页面
219-
reset() {
220-
this.showResetConfirm = true;
221-
},
222219
confirmReset() {
223220
localStorage.clear()
224221
this.clearEditorToDefault();
@@ -229,6 +226,9 @@ export default {
229226
this.colorChanged(this.config.colorOption[1].value)
230227
this.sizeChanged(this.config.sizeOption[2].value)
231228
this.$emit('cssChanged')
229+
this.selectFont = this.currentFont;
230+
this.selectSize = this.currentSize;
231+
this.selectColor = this.currentColor;
232232
this.showResetConfirm = false;
233233
},
234234
cancelReset() {
@@ -250,9 +250,9 @@ export default {
250250
'setHtml', 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions'])
251251
},
252252
mounted() {
253-
this.selectFont = this.currentFont
254-
this.selectSize = this.currentSize
255-
this.selectColor = this.currentColor
253+
this.selectFont = this.currentFont;
254+
this.selectSize = this.currentSize;
255+
this.selectColor = this.currentColor;
256256
}
257257
}
258258
</script>

0 commit comments

Comments
 (0)