mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-15 11:18:12 +00:00
perf: 文件文本编辑支持command+s保存
This commit is contained in:
parent
b4c1d05d2e
commit
02f75726c5
@ -386,6 +386,14 @@
|
|||||||
this.submitNewContent();
|
this.submitNewContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
editor.on('KeyDown', (e) => {
|
||||||
|
if (e.metaKey || e.ctrlKey) {
|
||||||
|
if (e.keyCode === 83) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.$emit('editorSave', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
editor.on('Change', (e) => {
|
editor.on('Change', (e) => {
|
||||||
if (this.editor !== null) {
|
if (this.editor !== null) {
|
||||||
if (this.getContent() !== this.value) {
|
if (this.getContent() !== this.value) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user