From b96b57afd6c5e90689136673e68fa3173e38d39b Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 16 Nov 2021 14:17:37 +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=E5=A4=8D=E7=94=A8=E4=BE=8B=E5=8A=A0=E8=BD=BD=E5=90=8E?= =?UTF-8?q?=E6=9C=AA=E5=8F=8A=E6=97=B6=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20--bug=3D1007961=20--user=3D=E8=B5=B5=E5=8B=87=20=E3=80=90?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E3=80=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9A=E4=B9=89-test-=E5=8A=A0=E8=BD=BD=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E7=94=A8=E4=BE=8B=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8A=A0=E8=BD=BD=E7=94=A8=E4=BE=8B=E7=9A=84?= =?UTF-8?q?json=E8=AF=B7=E6=B1=82=E4=BD=93=20https://www.tapd.cn/55049933/?= =?UTF-8?q?s/1068130?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/definition/components/body/ApiBody.vue | 3 +++ .../definition/components/request/http/ApiHttpRequestForm.vue | 3 +++ 2 files changed, 6 insertions(+) diff --git a/frontend/src/business/components/api/definition/components/body/ApiBody.vue b/frontend/src/business/components/api/definition/components/body/ApiBody.vue index 209b4fa9b4..994975b50f 100644 --- a/frontend/src/business/components/api/definition/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/definition/components/body/ApiBody.vue @@ -130,6 +130,9 @@ export default { }, watch: { + 'body.typeChange'(){ + this.reloadCodeEdit(); + }, 'body.raw'() { if (this.body.format !== 'JSON-SCHEMA' && this.body.raw) { try { 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 cc0af27bde..c6c2595558 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 @@ -198,6 +198,9 @@ export default { if (this.request.arguments && this.request.arguments.length > 1) { this.activeName = 'parameters'; } + if(this.request.body) { + this.request.body.typeChange = this.request.changeId; + } this.reload(); } },