From 1c7c3c95b809c8171ea09fd7bf2749dd63d4b714 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 30 Mar 2022 18:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=91=BD=E4=BB=A4=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/CodeRunner.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/CodeRunner.vue b/src/pages/CodeRunner.vue index 2ef8249..64603d2 100644 --- a/src/pages/CodeRunner.vue +++ b/src/pages/CodeRunner.vue @@ -114,7 +114,7 @@

         
@@ -160,6 +160,7 @@ export default { }, methods: { initEditor() { + let that = this; this.editor = monaco.editor.create( document.getElementById("monocaEditor"), { @@ -174,6 +175,12 @@ export default { }, } ); + this.editor.addCommand( + monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyB, + function () { + that.runCurrentCommand(); + } + ); }, getEditorValue() { return toRaw(this.editor).getValue();