mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: reset css editor
This commit is contained in:
parent
d253c75706
commit
2055615e8e
@ -198,12 +198,11 @@ let app = new Vue({
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
center: true
|
center: true
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
localStorage.removeItem('__editor_content');
|
localStorage.clear()
|
||||||
localStorage.removeItem('__css_content');
|
|
||||||
this.setDefaultContent();
|
this.setDefaultContent();
|
||||||
this.cssEditor.setValue(DEFAULT_CSS_CONTENT);
|
this.cssEditor.setValue(DEFAULT_CSS_CONTENT);
|
||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
this.refresh();
|
this.cssChanged()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
});
|
});
|
||||||
@ -220,8 +219,12 @@ let app = new Vue({
|
|||||||
localStorage.removeItem(name);
|
localStorage.removeItem(name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customStyle() {
|
async customStyle() {
|
||||||
this.showBox = !this.showBox;
|
this.showBox = !this.showBox;
|
||||||
|
let flag = await localStorage.getItem("__css_content")
|
||||||
|
if (!flag) {
|
||||||
|
this.cssEditor.setValue(DEFAULT_CSS_CONTENT);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setDefaultContent() {
|
setDefaultContent() {
|
||||||
axios({
|
axios({
|
||||||
|
Loading…
Reference in New Issue
Block a user