From a199d9f13943d25b629d95b6df4654c86a9c206a Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 15 Nov 2021 16:28:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E8=BD=BD=E5=BC=95=E7=94=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E7=A6=81=E7=94=A8=E6=89=A7=E8=A1=8C=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8C=E4=BC=98=E5=8C=96=E5=8A=A0=E8=BD=BD=E5=90=8E?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/definition/components/case/ApiCaseItem.vue | 8 ++++++-- .../components/request/http/ApiHttpRequestForm.vue | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 2 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 80690d7952..da4f783627 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -77,7 +77,7 @@ - + @@ -88,11 +88,14 @@ + size="mini" :disabled="!apiCase.id || isCaseEdit || loaded" circle v-if="!loaded"/> + + + @@ -352,6 +355,7 @@ export default { this.selectedEvent.currentTarget = $event.currentTarget; $event.currentTarget.className = "el-card is-always-shadow is-selected"; this.currentApi.request = item.request; + this.currentApi.request.changeId = getUUID(); } }, changePriority(row) { diff --git a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue index c044dfedd5..cc0af27bde 100644 --- a/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/definition/components/request/http/ApiHttpRequestForm.vue @@ -187,6 +187,20 @@ export default { } this.init(); }, + watch: { + 'request.changeId'() { + if (this.request.headers && this.request.headers.length > 1) { + this.activeName = 'headers'; + } + if (this.request.rest && this.request.rest.length > 1) { + this.activeName = 'rest'; + } + if (this.request.arguments && this.request.arguments.length > 1) { + this.activeName = 'parameters'; + } + this.reload(); + } + }, methods: { hasPermission, hasLicense,