From 11225985df8dfd23e89d228740ec4eb83f01398f Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 22 Jan 2025 12:05:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20FlowTabs=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E7=9A=84=E5=AD=90=E6=B5=81=E7=A8=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=9A=E5=B0=86=20removeFlow=20=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=20flows=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20subF?= =?UTF-8?q?lows=EF=BC=8C=E4=BB=A5=E6=AD=A3=E7=A1=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=AD=90=E6=B5=81=E7=A8=8B=E7=9A=84=E5=88=A0=E9=99=A4=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E5=B9=B6=E7=AE=80=E5=8C=96=20saveFlows=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BB=A5=E7=9B=B4=E6=8E=A5=E5=B1=95=E5=BC=80?= =?UTF-8?q?=20flow=20=E5=AF=B9=E8=B1=A1=E3=80=82=E6=AD=A4=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E9=AB=98=E4=BA=86=E5=AD=90=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E7=AE=A1=E7=90=86=E5=92=8C=E6=95=B0=E6=8D=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=9A=84=E5=87=86=E7=A1=AE=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composer/FlowTabs.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/composer/FlowTabs.vue b/src/components/composer/FlowTabs.vue index 7ede6b2..422b14d 100644 --- a/src/components/composer/FlowTabs.vue +++ b/src/components/composer/FlowTabs.vue @@ -248,7 +248,7 @@ export default defineComponent({ this.activeTab = id; }, removeFlow(flow) { - const index = this.flows.findIndex((f) => f.id === flow.id); + const index = this.subFlows.findIndex((f) => f.id === flow.id); if (index > -1) { this.subFlows.splice(index, 1); this.activeTab = this.flows[0].id; @@ -290,8 +290,7 @@ export default defineComponent({ }, saveFlows() { const flowsData = this.flows.map((flow) => ({ - id: flow.id, - name: flow.name, + ...flow, commands: flow.commands.map((cmd) => { const cmdCopy = { ...cmd }; // 移除不必要的属性