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

This commit is contained in:
xinxin.wu 2024-08-21 15:52:23 +08:00 committed by Craftsman
parent 53f554cf4b
commit d0af0072c2
3 changed files with 15 additions and 97 deletions

View File

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

View File

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

View File

@ -141,13 +141,6 @@
width: 220, width: 220,
showTooltip: true, showTooltip: true,
}, },
{
title: 'common.desc',
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 300,
},
]; ];
/** /**
@ -162,6 +155,12 @@
showTooltip: true, showTooltip: true,
columnSelectorDisabled: true, columnSelectorDisabled: true,
}, },
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
width: 200,
},
{ {
title: 'apiTestManagement.required', title: 'apiTestManagement.required',
dataIndex: 'required', dataIndex: 'required',
@ -173,50 +172,6 @@
}, },
width: 68, 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, showTooltip: true,
columnSelectorDisabled: true, columnSelectorDisabled: true,
}, },
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
showTooltip: true,
width: 200,
},
{ {
title: 'apiTestManagement.required', title: 'apiTestManagement.required',
dataIndex: 'required', dataIndex: 'required',
@ -245,51 +207,6 @@
}, },
width: 68, 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 [ return [