From 6d6853101bccdad6e7548dc7b512d4c7e03de4c8 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 18 Jan 2021 13:42:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E5=A4=8D=E5=88=B6=E7=BB=84=E4=BB=B6=E6=94=BE?= =?UTF-8?q?=E5=88=B0=E4=B8=80=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/automation/scenario/EditApiScenario.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 7f8d969711..f88dc00e09 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -636,7 +636,12 @@ if (obj.name) { obj.name = obj.name + '_copy'; } - hashTree.push(obj); + const index = hashTree.findIndex(d => d.resourceId === row.resourceId); + if (index != -1) { + hashTree.splice(index, 0, obj); + } else { + hashTree.push(obj); + } this.sort(); this.reload(); }