From d02f5305382bc2e016947ee2eb20ffb6f4df0c52 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 24 Nov 2020 14:36:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E4=BD=93=E5=8F=96=E6=B6=88=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- .../api/test/components/body/ApiBody.vue | 2 +- .../common/components/MsCodeEdit.vue | 38 ++++++++++++------- frontend/src/business/components/xpack | 2 +- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 419c75bca6..57d6f78efa 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 419c75bca64b7c5bfbd1194d7f0fd9919f0caa04 +Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed diff --git a/frontend/src/business/components/api/test/components/body/ApiBody.vue b/frontend/src/business/components/api/test/components/body/ApiBody.vue index e8a0161a37..ce63d08e89 100644 --- a/frontend/src/business/components/api/test/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/test/components/body/ApiBody.vue @@ -20,7 +20,7 @@ :description="$t('api_test.request.parameters_desc')" v-if="body.isKV()"/>
- +
diff --git a/frontend/src/business/components/common/components/MsCodeEdit.vue b/frontend/src/business/components/common/components/MsCodeEdit.vue index afbe57255c..2f443ee120 100644 --- a/frontend/src/business/components/common/components/MsCodeEdit.vue +++ b/frontend/src/business/components/common/components/MsCodeEdit.vue @@ -28,6 +28,12 @@ init: { type: Function }, + enableFormat: { + type: Boolean, + default() { + return true; + } + }, readOnly: { type: Boolean, default() { @@ -74,20 +80,24 @@ } }, format() { - switch (this.mode) { - case 'json': - this.formatData = formatJson(this.data); - break; - case 'html': - this.formatData = toDiffableHtml(this.data); - break; - case 'xml': - this.formatData = formatXml(this.data); - break; - default: - if (this.data) { - this.formatData = this.data; - } + if (this.enableFormat) { + switch (this.mode) { + case 'json': + this.formatData = formatJson(this.data); + break; + case 'html': + this.formatData = toDiffableHtml(this.data); + break; + case 'xml': + this.formatData = formatXml(this.data); + break; + default: + if (this.data) { + this.formatData = this.data; + } + } + } else { + this.formatData = this.data; } } } diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 33bbdb3f52..71d57ae5d7 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 33bbdb3f528c914bf333b2c1839dd6d3bbd9b569 +Subproject commit 71d57ae5d7f8bb5c93a29504ac6f2300dc189ce9