fix(接口测试): 参数表格新增行&变量断言新增行&脚本断言显示问题修复

This commit is contained in:
baiqi 2024-08-13 11:03:27 +08:00 committed by Craftsman
parent 9c245c4934
commit 086ecb3caa
5 changed files with 11 additions and 6 deletions

View File

@ -16,8 +16,6 @@
import { EQUAL, statusCodeOptions } from '@/components/pure/ms-advance-filter/index'; import { EQUAL, statusCodeOptions } from '@/components/pure/ms-advance-filter/index';
import paramsTable, { type ParamTableColumn } from '@/views/api-test/components/paramTable.vue'; import paramsTable, { type ParamTableColumn } from '@/views/api-test/components/paramTable.vue';
import { responseHeaderOption } from '@/config/apiTest';
interface Param { interface Param {
[key: string]: any; [key: string]: any;
variableAssertionItems: any[]; variableAssertionItems: any[];
@ -48,7 +46,6 @@
slotName: 'key', slotName: 'key',
showInTable: true, showInTable: true,
showDrag: true, showDrag: true,
options: responseHeaderOption,
}, },
{ {
title: 'ms.assertion.matchCondition', // title: 'ms.assertion.matchCondition', //

View File

@ -539,7 +539,7 @@
emit('selectAll', checked); emit('selectAll', checked);
} }
function rowClass(record: TableData, rowIndex: number) { function rowClass(record: TableData) {
if (record.diff) { if (record.diff) {
if (props.diffMode === 'add') { if (props.diffMode === 'add') {
return 'add-row-class'; return 'add-row-class';
@ -575,6 +575,12 @@
.arco-textarea-wrapper { .arco-textarea-wrapper {
border-radius: 0; border-radius: 0;
} }
article {
position: relative;
top: 50%;
display: inline-block;
transform: translateY(-50%); /* 垂直居中 */
}
} }
} }
.ms-form-table-td-text { .ms-form-table-td-text {
@ -663,6 +669,7 @@
} }
} }
:deep(.ms-form-table-input:not(.arco-input-focus, .arco-select-view-focus, .arco-textarea-focus)) { :deep(.ms-form-table-input:not(.arco-input-focus, .arco-select-view-focus, .arco-textarea-focus)) {
border-radius: 0;
&:not(:hover) { &:not(:hover) {
@apply bg-transparent; @apply bg-transparent;

View File

@ -926,7 +926,7 @@
}); });
const { lastDataIsDefault } = filterKeyValParams(arr, defaultLineData.value, false); const { lastDataIsDefault } = filterKeyValParams(arr, defaultLineData.value, false);
if ( if (
(arr.length === 1 && !lastDataIsDefault) || !lastDataIsDefault ||
(hasNoIdItem && (hasNoIdItem &&
!props.disabledExceptParam && !props.disabledExceptParam &&
!props.disabledParamValue && !props.disabledParamValue &&

View File

@ -60,7 +60,7 @@
<a-spin <a-spin
v-show="innerIsExpanded" v-show="innerIsExpanded"
:loading="props.loading" :loading="props.loading"
:class="[isResponseModel ? 'h-[381px] w-full' : 'w-full px-[16px] pb-[16px]']" :class="[isResponseModel ? 'h-[381px] w-full' : 'w-full flex-1 px-[16px] pb-[16px]']"
> >
<edit <edit
v-if="props.isEdit && activeResponseType === 'content' && responseDefinition" v-if="props.isEdit && activeResponseType === 'content' && responseDefinition"

View File

@ -69,6 +69,7 @@
:request-result="currentResponse" :request-result="currentResponse"
:console="currentResponse?.console" :console="currentResponse?.console"
:is-edit="false" :is-edit="false"
is-definition
hide-layout-switch hide-layout-switch
> >
<template #titleRight> <template #titleRight>