From 4cdcae4413f4e30c28b37610d5cce74508f3e80e Mon Sep 17 00:00:00 2001 From: teukkk Date: Fri, 29 Mar 2024 18:52:00 +0800 Subject: [PATCH] =?UTF-8?q?style(=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF):=20?= =?UTF-8?q?=E5=BC=95=E7=94=A8API/CASE=E8=A1=A8=E6=A0=BC=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ms-assertion/comp/ResponseHeaderTab.vue | 24 ++++++++++-------- .../ms-assertion/comp/VariableTab.vue | 25 +++++++++++-------- .../views/api-test/components/paramTable.vue | 3 ++- .../components/requestComposition/body.vue | 19 ++++++++------ .../components/requestComposition/header.vue | 20 +++++++++------ .../components/requestComposition/query.vue | 25 +++++++++++-------- .../components/requestComposition/rest.vue | 21 ++++++++++------ 7 files changed, 83 insertions(+), 54 deletions(-) diff --git a/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue b/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue index dcbda40973..e604a22fb0 100644 --- a/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue +++ b/frontend/src/components/business/ms-assertion/comp/ResponseHeaderTab.vue @@ -46,7 +46,7 @@ enable: true, }; - const columns: ParamTableColumn[] = [ + const columns = computed(() => [ { title: 'ms.assertion.responseHeader', // 响应头 dataIndex: 'header', @@ -71,15 +71,19 @@ showInTable: true, showDrag: true, }, - { - title: '', - columnTitle: 'common.operation', - slotName: 'operation', - width: 50, - showInTable: true, - showDrag: true, - }, - ]; + ...(props.disabled + ? [] + : [ + { + title: '', + columnTitle: 'common.operation', + slotName: 'operation', + width: 50, + showInTable: true, + showDrag: true, + }, + ]), + ]); function handleParamTableChange(resultArr: any[], isInit?: boolean) { condition.value.assertions = [...resultArr]; diff --git a/frontend/src/components/business/ms-assertion/comp/VariableTab.vue b/frontend/src/components/business/ms-assertion/comp/VariableTab.vue index 5c38c55f17..2b9c4b644f 100644 --- a/frontend/src/components/business/ms-assertion/comp/VariableTab.vue +++ b/frontend/src/components/business/ms-assertion/comp/VariableTab.vue @@ -41,7 +41,7 @@ enable: true, }; - const columns: ParamTableColumn[] = [ + const columns = computed(() => [ { title: 'ms.assertion.variableName', // 变量名 dataIndex: 'variableName', @@ -65,15 +65,20 @@ showInTable: true, showDrag: true, }, - { - title: '', - columnTitle: 'common.operation', - slotName: 'operation', - width: 50, - showInTable: true, - showDrag: true, - }, - ]; + ...(props.disabled + ? [] + : [ + { + title: '', + columnTitle: 'common.operation', + slotName: 'operation', + width: 50, + showInTable: true, + showDrag: true, + }, + ]), + ]); + function handleParamTableChange(resultArr: any[], isInit?: boolean) { condition.value.variableAssertionItems = [...resultArr]; if (!isInit) { diff --git a/frontend/src/views/api-test/components/paramTable.vue b/frontend/src/views/api-test/components/paramTable.vue index 625338e902..37d858aeae 100644 --- a/frontend/src/views/api-test/components/paramTable.vue +++ b/frontend/src/views/api-test/components/paramTable.vue @@ -424,7 +424,7 @@
{{ '-' }}
-