From bc816f689fee07a0d083c583d061ce8644222d27 Mon Sep 17 00:00:00 2001 From: fofolee Date: Thu, 14 Apr 2022 00:09:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E8=BE=93=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommandCard.vue | 2 +- src/components/CommandRunResult.vue | 4 ++-- src/pages/ConfigurationPage.vue | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) 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),