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 @@
{{ '-' }}
-