From 56ff850951d2fbdd3348108fd2d4a87896db3b31 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 13 Sep 2021 13:57:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):?= =?UTF-8?q?=20=E5=88=9B=E5=BB=BA=E7=94=A8=E4=BE=8B=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=20--bug=3D1006469=20--user?= =?UTF-8?q?=3D=E8=B5=B5=E5=8B=87=20=E3=80=90github#6023=E3=80=91=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=8E=A5...=20https://www.tapd.cn/55049933/s/1045857?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/definition/ApiDefinition.vue | 5 ++++- .../components/case/ApiCaseList.vue | 21 ------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 39db360be4..2556e08d5c 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -560,6 +560,9 @@ export default { type: action, api: api, }); + if(action === "ADD") { + this.activeTab = "api"; + } this.apiDefaultTab = newTabName; }, debug(id) { @@ -650,7 +653,7 @@ export default { row.tags = JSON.parse(row.tags); } } - this.handleTabsEdit(name, "ADD", row); + this.handleTabsEdit(name, "TEST", row); }, mockConfig(data) { let targetName = this.$t("commons.mock") + "-" + data.apiName; 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 b8667c3b48..ddc6f9c279 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -221,27 +221,6 @@ export default { } else { this.addCase(); } - // this.$post("/api/testcase/list", this.condition, response => { - // let data = response.data; - // data.forEach(apiCase => { - // if (apiCase.tags && apiCase.tags.length > 0) { - // apiCase.tags = JSON.parse(apiCase.tags); - // this.$set(apiCase, 'selected', false); - // } - // if (Object.prototype.toString.call(apiCase.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') { - // apiCase.request = JSON.parse(apiCase.request); - // } - // if (!apiCase.request.hashTree) { - // apiCase.request.hashTree = []; - // } - // }); - // this.apiCaseList = data; - // if (apiCase) { - // this.copyCase(apiCase); - // } else { - // this.addCase(); - // } - // }); }, apiCaseClose() {