From 65b702c9b5d465fab4e709c1213f468d9e98fdd0 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 17 Dec 2020 15:56:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=8D=E5=88=B6=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=B2=A1=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/components/case/ApiCaseItem.vue | 2 +- .../definition/components/case/ApiCaseList.vue | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index 68043b55aa..8e9af00521 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -149,7 +149,7 @@ }, copyCase(data) { let obj = {name: "copy_" + data.name, priority: data.priority, active: false, request: data.request}; - this.apiCaseList.unshift(obj); + this.$emit('copyCase', obj); }, selectTestCase(item, $event) { diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue index c71dc970d1..0ddaddc976 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -21,12 +21,13 @@
+ @refresh="getApiTest" + @singleRun="singleRun" + @copyCase="copyCase" + @showExecResult="showExecResult" + :is-case-edit="isCaseEdit" + :api="api" + :api-case="item" :index="index"/>
@@ -187,6 +188,10 @@ } }, + copyCase(data) { + this.apiCaseList.unshift(data); + }, + handleClose() { this.visible = false; },