mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
parent
449617fd23
commit
bc4a629222
@ -31,11 +31,11 @@
|
|||||||
>
|
>
|
||||||
<i class="el-icon-document" size="medium" @click="$emit('export')"></i>
|
<i class="el-icon-document" size="medium" @click="$emit('export')"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<!-- 页面重置 -->
|
<!-- 样式重置 -->
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="header__item"
|
class="header__item"
|
||||||
:effect="effect"
|
:effect="effect"
|
||||||
content="重置页面"
|
content="重置样式"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
@ -316,11 +316,10 @@ export default {
|
|||||||
this.setCssEditorValue(DEFAULT_CSS_CONTENT);
|
this.setCssEditorValue(DEFAULT_CSS_CONTENT);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 重置页面
|
// 重置样式
|
||||||
confirmReset() {
|
confirmReset() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.clearEditorToDefault();
|
this.cssEditor.setValue(DEFAULT_CSS_CONTENT);
|
||||||
this.editor.focus();
|
|
||||||
this.citeStatus = false;
|
this.citeStatus = false;
|
||||||
this.statusChanged(false);
|
this.statusChanged(false);
|
||||||
this.fontChanged(this.config.builtinFonts[0].value);
|
this.fontChanged(this.config.builtinFonts[0].value);
|
||||||
@ -337,7 +336,6 @@ export default {
|
|||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
},
|
},
|
||||||
...mapMutations([
|
...mapMutations([
|
||||||
"clearEditorToDefault",
|
|
||||||
"setCurrentColor",
|
"setCurrentColor",
|
||||||
"setCiteStatus",
|
"setCiteStatus",
|
||||||
"themeChanged",
|
"themeChanged",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:visible="showResetConfirm"
|
:visible="showResetConfirm"
|
||||||
@close="$emit('close')"
|
@close="$emit('close')"
|
||||||
>
|
>
|
||||||
<div class="text">此操作将丢失本地缓存的文本和自定义样式,是否继续?</div>
|
<div class="text">此操作将丢失本地自定义样式,是否继续?</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button :type="btnType" plain @click="$emit('close')">取 消</el-button>
|
<el-button :type="btnType" plain @click="$emit('close')">取 消</el-button>
|
||||||
<el-button :type="btnType" @click="$emit('confirm')" plain
|
<el-button :type="btnType" @click="$emit('confirm')" plain
|
||||||
|
@ -47,8 +47,8 @@ export default {
|
|||||||
key: "insertTable",
|
key: "insertTable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "页面重置",
|
text: "恢复默认样式",
|
||||||
key: "pageReset",
|
key: "resetStyle",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -392,7 +392,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onMenuEvent(type, info = {}) {
|
onMenuEvent(type, info = {}) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "pageReset":
|
case "resetStyle":
|
||||||
this.$refs.header.showResetConfirm = true;
|
this.$refs.header.showResetConfirm = true;
|
||||||
break;
|
break;
|
||||||
case "insertPic":
|
case "insertPic":
|
||||||
|
@ -154,12 +154,6 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
state.output = output;
|
state.output = output;
|
||||||
},
|
},
|
||||||
clearEditorToDefault(state) {
|
|
||||||
const doc = formatDoc(DEFAULT_CONTENT);
|
|
||||||
|
|
||||||
state.editor.setValue(doc);
|
|
||||||
state.cssEditor.setValue(DEFAULT_CSS_CONTENT);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
|
Loading…
Reference in New Issue
Block a user