From 02f75726c577d22ec50052c2aa514c9f6ef283f3 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 10 Jun 2022 08:17:51 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=96=87=E4=BB=B6=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=94=AF=E6=8C=81command+s=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/TEditor.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/assets/js/components/TEditor.vue b/resources/assets/js/components/TEditor.vue index 61b2846f9..152c30463 100755 --- a/resources/assets/js/components/TEditor.vue +++ b/resources/assets/js/components/TEditor.vue @@ -386,6 +386,14 @@ 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) => { if (this.editor !== null) { if (this.getContent() !== this.value) {