mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-18 12:36:58 +08:00
运行命令快捷键
This commit is contained in:
parent
ac184cdad1
commit
1c7c3c95b8
@ -114,7 +114,7 @@
|
|||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<q-card-section class="row items-center">
|
<q-card-section class="row items-center">
|
||||||
<pre
|
<pre
|
||||||
:class="runResultStatus ? 'text-green' : 'text-red'"
|
:class="runResultStatus ? '' : 'text-red'"
|
||||||
v-html="runResult"
|
v-html="runResult"
|
||||||
></pre>
|
></pre>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
@ -160,6 +160,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initEditor() {
|
initEditor() {
|
||||||
|
let that = this;
|
||||||
this.editor = monaco.editor.create(
|
this.editor = monaco.editor.create(
|
||||||
document.getElementById("monocaEditor"),
|
document.getElementById("monocaEditor"),
|
||||||
{
|
{
|
||||||
@ -174,6 +175,12 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
this.editor.addCommand(
|
||||||
|
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyB,
|
||||||
|
function () {
|
||||||
|
that.runCurrentCommand();
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
getEditorValue() {
|
getEditorValue() {
|
||||||
return toRaw(this.editor).getValue();
|
return toRaw(this.editor).getValue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user