style(接口测试): 定义预览-必填放第二个&用例不展示schema

This commit is contained in:
teukkk 2024-07-26 17:50:20 +08:00 committed by 刘瑞斌
parent 6ec9bf4963
commit f4aa52f120
1 changed files with 27 additions and 25 deletions

View File

@ -138,7 +138,7 @@
{{ `${t('apiTestManagement.requestBody')}-${previewDetail.body.bodyType}` }} {{ `${t('apiTestManagement.requestBody')}-${previewDetail.body.bodyType}` }}
</div> </div>
<a-radio-group <a-radio-group
v-if="previewDetail.body.bodyType === RequestBodyFormat.JSON" v-if="previewDetail.body.bodyType === RequestBodyFormat.JSON && !props.isCase"
v-model:model-value="bodyShowType" v-model:model-value="bodyShowType"
type="button" type="button"
size="mini" size="mini"
@ -173,12 +173,14 @@
" "
> >
<MsJsonSchema <MsJsonSchema
v-if="previewDetail.body.bodyType === RequestBodyFormat.JSON && bodyShowType === 'schema'" v-if="
previewDetail.body.bodyType === RequestBodyFormat.JSON && bodyShowType === 'schema' && !props.isCase
"
:data="previewDetail.body.jsonBody.jsonSchemaTableData" :data="previewDetail.body.jsonBody.jsonSchemaTableData"
disabled disabled
/> />
<MsCodeEditor <MsCodeEditor
v-show="!(previewDetail.body.bodyType === RequestBodyFormat.JSON && bodyShowType === 'schema')" v-else
:model-value="bodyCode" :model-value="bodyCode"
theme="vs" theme="vs"
height="200px" height="200px"
@ -565,6 +567,17 @@
width: 220, width: 220,
columnSelectorDisabled: true, columnSelectorDisabled: true,
}, },
{
title: 'apiTestManagement.required',
dataIndex: 'required',
slotName: 'required',
inputType: 'text',
columnSelectorDisabled: true,
valueFormat: (record) => {
return record.required ? t('common.yes') : t('common.no');
},
width: 68,
},
{ {
title: 'apiTestDebug.paramType', title: 'apiTestDebug.paramType',
dataIndex: 'paramType', dataIndex: 'paramType',
@ -576,17 +589,6 @@
title: 'apiTestManagement.paramVal', title: 'apiTestManagement.paramVal',
dataIndex: 'value', dataIndex: 'value',
inputType: 'text', inputType: 'text',
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.required',
dataIndex: 'required',
slotName: 'required',
inputType: 'text',
valueFormat: (record) => {
return record.required ? t('common.yes') : t('common.no');
},
width: 68,
}, },
{ {
title: 'apiTestDebug.paramLengthRange', title: 'apiTestDebug.paramLengthRange',
@ -648,6 +650,17 @@
width: 220, width: 220,
columnSelectorDisabled: true, columnSelectorDisabled: true,
}, },
{
title: 'apiTestManagement.required',
dataIndex: 'required',
slotName: 'required',
inputType: 'text',
columnSelectorDisabled: true,
valueFormat: (record) => {
return record.required ? t('common.yes') : t('common.no');
},
width: 68,
},
{ {
title: 'apiTestManagement.paramsType', title: 'apiTestManagement.paramsType',
dataIndex: 'paramType', dataIndex: 'paramType',
@ -660,17 +673,6 @@
dataIndex: 'value', dataIndex: 'value',
inputType: 'text', inputType: 'text',
showTooltip: true, showTooltip: true,
columnSelectorDisabled: true,
},
{
title: 'apiTestManagement.required',
dataIndex: 'required',
slotName: 'required',
inputType: 'text',
valueFormat: (record) => {
return record.required ? t('common.yes') : t('common.no');
},
width: 68,
}, },
{ {
title: 'apiTestDebug.paramLengthRange', title: 'apiTestDebug.paramLengthRange',