mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-15 23:54:35 +08:00
ctrl+space 快速 console.log
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
:textbtn="!enableHtml"
|
||||
:imagebtn="!enableHtml && isDataUrl"
|
||||
@showImg="showBase64Img"
|
||||
:style="{
|
||||
height: headerHeight + 'px',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@@ -143,17 +146,12 @@ export default {
|
||||
setTimeout(() => {
|
||||
utools.outPlugin();
|
||||
}, 500);
|
||||
let resultOpts = { outPlugin, action, earlyExit };
|
||||
switch (currentCommand.program) {
|
||||
case "quickcommand":
|
||||
window.runCodeInSandbox(
|
||||
currentCommand.cmd,
|
||||
(stdout, stderr) => {
|
||||
this.handleResult(stdout, stderr, {
|
||||
outPlugin,
|
||||
action,
|
||||
earlyExit,
|
||||
});
|
||||
},
|
||||
(stdout, stderr) => this.handleResult(stdout, stderr, resultOpts),
|
||||
{ enterData: this.$root.enterData }
|
||||
);
|
||||
break;
|
||||
@@ -165,13 +163,7 @@ export default {
|
||||
currentCommand.cmd,
|
||||
this.getCommandOpt(currentCommand),
|
||||
currentCommand.output === "terminal",
|
||||
(stdout, stderr) => {
|
||||
this.handleResult(stdout, stderr, {
|
||||
outPlugin,
|
||||
action,
|
||||
earlyExit,
|
||||
});
|
||||
}
|
||||
(stdout, stderr) => this.handleResult(stdout, stderr, resultOpts)
|
||||
);
|
||||
this.listenStopSign();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user