fix(接口测试): 修复接口测试diff对比显示滚动条去掉多余字段&无差异刷新

This commit is contained in:
xinxin.wu 2024-08-21 15:52:23 +08:00 committed by 刘瑞斌
parent e2f7700d5c
commit 3ecc6519bb
3 changed files with 15 additions and 97 deletions

View File

@ -1,6 +1,6 @@
<template>
<MsTag
v-if="props.inconsistentWithApi || props.ignoreApiChange || props.ignoreApiDiff"
v-if="props.inconsistentWithApi"
class="cursor-pointer font-normal"
:type="props.ignoreApiDiff ? 'default' : 'warning'"
theme="light"

View File

@ -94,6 +94,7 @@
@close="closeDifferent"
@clear-this-change="(isEvery:boolean)=>brashChangeHandler(isEvery)"
@sync="syncParamsHandler"
@load-list="emit('loadCase', props.detail.id as string)"
/>
</a-tab-pane>
<a-tab-pane key="reference" :title="t('apiTestManagement.reference')" class="px-[18px] py-[16px]">

View File

@ -141,13 +141,6 @@
width: 220,
showTooltip: true,
},
{
title: 'common.desc',
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 300,
},
];
/**
@ -162,6 +155,12 @@
showTooltip: true,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
width: 200,
},
{
title: 'apiTestManagement.required',
dataIndex: 'required',
@ -173,50 +172,6 @@
},
width: 68,
},
{
title: 'apiTestDebug.paramType',
dataIndex: 'paramType',
inputType: 'text',
width: 96,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
width: 200,
},
{
title: 'apiTestDebug.paramLengthRange',
dataIndex: 'lengthRange',
slotName: 'lengthRange',
inputType: 'text',
showInTable: false,
valueFormat: (record) => {
return [null, undefined].includes(record.minLength) && [null, undefined].includes(record.maxLength)
? '-'
: `${record.minLength} ${t('common.to')} ${record.maxLength}`;
},
width: 110,
},
{
title: 'apiTestDebug.encode',
dataIndex: 'encode',
slotName: 'encode',
inputType: 'text',
showInTable: false,
valueFormat: (record) => {
return record.encode ? t('common.yes') : t('common.no');
},
width: 68,
},
{
title: 'common.desc',
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 200,
},
];
/**
@ -234,6 +189,13 @@
showTooltip: true,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
showTooltip: true,
width: 200,
},
{
title: 'apiTestManagement.required',
dataIndex: 'required',
@ -245,51 +207,6 @@
},
width: 68,
},
{
title: 'apiTestManagement.paramsType',
dataIndex: 'paramType',
inputType: 'text',
width: 96,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
showTooltip: true,
width: 200,
},
{
title: 'apiTestDebug.paramLengthRange',
dataIndex: 'lengthRange',
slotName: 'lengthRange',
inputType: 'text',
showInTable: false,
valueFormat: (record) => {
return [null, undefined].includes(record.minLength) && [null, undefined].includes(record.maxLength)
? '-'
: `${record.minLength} ${t('common.to')} ${record.maxLength}`;
},
width: 110,
},
{
title: 'apiTestDebug.encode',
dataIndex: 'encode',
slotName: 'encode',
inputType: 'text',
showInTable: false,
valueFormat: (record) => {
return record.encode ? t('common.yes') : t('common.no');
},
width: 68,
},
{
title: 'common.desc',
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 200,
},
];
}
return [