diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index 83cc17c..63ae593 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -294,7 +294,7 @@ export default { editCommand() { let event = { type: "edit", - data: this.commandInfo, + data: this.commandInfo.features.code, }; this.$emit("commandChanged", event); }, diff --git a/src/components/CommandRunResult.vue b/src/components/CommandRunResult.vue index 6ef4dc1..1e41c5e 100644 --- a/src/components/CommandRunResult.vue +++ b/src/components/CommandRunResult.vue @@ -99,7 +99,7 @@ export default { if (currentCommand.program === "quickcommand") { window.runCodeInVm(currentCommand.cmd, (stdout, stderr) => { if (stderr) return this.showRunResult(stderr, false, action); - this.showRunResult(stdout, true, action); + !outPlugin && this.showRunResult(stdout, true, action); }); } else { let option = this.$programmings[currentCommand.program]; @@ -113,7 +113,7 @@ export default { currentCommand.output === "terminal", (stdout, stderr) => { if (stderr) return this.showRunResult(stderr, false, action); - this.showRunResult(stdout, true, action); + !outPlugin && this.showRunResult(stdout, true, action); } ); } diff --git a/src/pages/ConfigurationPage.vue b/src/pages/ConfigurationPage.vue index 3f085fc..73eaed1 100644 --- a/src/pages/ConfigurationPage.vue +++ b/src/pages/ConfigurationPage.vue @@ -411,6 +411,8 @@ export default { }, // 编辑命令 editCommand(command) { + // 即可传入 code,也可直接传入 command + if (typeof command === "string") command = this.allQuickCommands[command]; this.commandEditorAction = { type: "edit", data: _.cloneDeep(command),