From a8c3528566abbd1b2796a962d57feb255c521120 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 12 Feb 2025 23:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=94=B9subcommand?= =?UTF-8?q?=E6=97=B6=EF=BC=8Coutput=E4=B8=8D=E5=8F=98=E6=9B=B4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composer/MultiParams.vue | 5 ++++- src/components/composer/card/OutputEditor.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/composer/MultiParams.vue b/src/components/composer/MultiParams.vue index 74b7982..b765c35 100644 --- a/src/components/composer/MultiParams.vue +++ b/src/components/composer/MultiParams.vue @@ -220,7 +220,10 @@ export default defineComponent({ code: this.generateCode(subCommand, argvs), }; if (resetOutputVariable) { - delete newModelValue.outputVariable; + newModelValue.outputVariable = { + name: "", + details: {}, + }; } this.$emit("update:modelValue", newModelValue); }, diff --git a/src/components/composer/card/OutputEditor.vue b/src/components/composer/card/OutputEditor.vue index c9149c7..07b1e9e 100644 --- a/src/components/composer/card/OutputEditor.vue +++ b/src/components/composer/card/OutputEditor.vue @@ -200,7 +200,7 @@ export default defineComponent({ currentSubCommand() { if (!this.command.subCommands) return {}; return this.command.subCommands.find( - (cmd) => cmd.value === this.command.value + (cmd) => cmd.value === this.command.subCommand ); }, commandName() {