mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-10 07:24:37 +08:00
运行命令快捷键
This commit is contained in:
parent
ac184cdad1
commit
1c7c3c95b8
@ -114,7 +114,7 @@
|
||||
</q-toolbar>
|
||||
<q-card-section class="row items-center">
|
||||
<pre
|
||||
:class="runResultStatus ? 'text-green' : 'text-red'"
|
||||
:class="runResultStatus ? '' : 'text-red'"
|
||||
v-html="runResult"
|
||||
></pre>
|
||||
</q-card-section>
|
||||
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user