修复 bug

This commit is contained in:
fofolee 2022-04-08 00:22:14 +08:00
parent ec41728d0e
commit 4a28130bbb

View File

@ -185,20 +185,13 @@ export default {
languageBarHeight: 40, languageBarHeight: 40,
canCommandSave: this.action.type === "code" ? false : true, canCommandSave: this.action.type === "code" ? false : true,
quickcommandInfo: { quickcommandInfo: {
features: {
explain: "",
platform: ["win32", "linux", "darwin"],
},
program: "quickcommand", program: "quickcommand",
cmd: "", cmd: "",
output: "text",
hasSubInput: false,
scptarg: "", scptarg: "",
charset: { charset: {
scriptCode: "", scriptCode: "",
outputCode: "", outputCode: "",
}, },
tags: [],
customOptions: { customOptions: {
bin: "", bin: "",
argv: "", argv: "",
@ -364,7 +357,7 @@ export default {
cmd = await this.replaceTempInputVals(cmd); cmd = await this.replaceTempInputVals(cmd);
let terminal = false; let terminal = false;
let raw = true; let raw = true;
switch (this.output) { switch (this.$refs.menu.currentCommand.output) {
case "html": case "html":
raw = false; raw = false;
break; break;
@ -381,7 +374,7 @@ export default {
this.showRunResult(stdout, raw, true); this.showRunResult(stdout, raw, true);
}); });
} else { } else {
let option = this.$programmings[this.program]; let option = this.$programmings[this.quickcommandInfo.program];
if (this.quickcommandInfo.program === "custom") if (this.quickcommandInfo.program === "custom")
option = this.quickcommandInfo.customOptions; option = this.quickcommandInfo.customOptions;
option.scptarg = this.quickcommandInfo.scptarg; option.scptarg = this.quickcommandInfo.scptarg;