fix(接口测试): 修复接口调试展示断言和提取tab问题
This commit is contained in:
parent
60df9b676a
commit
08d7f02df7
|
@ -277,6 +277,7 @@
|
|||
:is-edit="props.isDefinition && isHttpProtocol"
|
||||
:upload-temp-file-api="props.uploadTempFileApi"
|
||||
:loading="requestVModel.executeLoading || loading"
|
||||
:is-definition="props.isDefinition"
|
||||
@change-expand="changeVerticalExpand"
|
||||
@change-layout="handleActiveLayoutChange"
|
||||
@change="handleActiveDebugChange"
|
||||
|
@ -534,7 +535,6 @@
|
|||
RequestConditionProcessor,
|
||||
RequestDefinitionStatus,
|
||||
RequestMethods,
|
||||
RequestParamsType,
|
||||
} from '@/enums/apiEnum';
|
||||
|
||||
import type { ResponseItem } from './response/edit.vue';
|
||||
|
@ -1295,7 +1295,7 @@
|
|||
* 保存快捷键处理
|
||||
*/
|
||||
async function handleSaveShortcut() {
|
||||
if (isHttpProtocol && !requestVModel.value.url) {
|
||||
if (isHttpProtocol.value && !requestVModel.value.url) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
:is-http-protocol="props.isHttpProtocol"
|
||||
:is-priority-local-exec="props.isPriorityLocalExec"
|
||||
:request-url="props.requestUrl"
|
||||
:is-definition="props.isDefinition"
|
||||
@execute="emit('execute', props.isPriorityLocalExec ? 'localExec' : 'serverExec')"
|
||||
/>
|
||||
</a-spin>
|
||||
|
@ -162,6 +163,7 @@
|
|||
loading?: boolean;
|
||||
isEdit?: boolean; // 是否可编辑
|
||||
uploadTempFileApi?: (...args) => Promise<any>; // 上传临时文件接口
|
||||
isDefinition?: boolean;
|
||||
}>(),
|
||||
{
|
||||
activeLayout: 'vertical',
|
||||
|
|
|
@ -104,6 +104,7 @@
|
|||
isPriorityLocalExec: boolean;
|
||||
requestUrl?: string;
|
||||
isHttpProtocol: boolean;
|
||||
isDefinition?: boolean;
|
||||
}>();
|
||||
const emit = defineEmits(['execute']);
|
||||
|
||||
|
@ -123,10 +124,8 @@
|
|||
label: t('apiTestDebug.realRequest'),
|
||||
value: ResponseComposition.REAL_REQUEST,
|
||||
},
|
||||
{
|
||||
label: t('apiTestDebug.console'),
|
||||
value: ResponseComposition.CONSOLE,
|
||||
},
|
||||
...(props.isDefinition
|
||||
? [
|
||||
{
|
||||
label: t('apiTestDebug.extract'),
|
||||
value: ResponseComposition.EXTRACT,
|
||||
|
@ -135,7 +134,10 @@
|
|||
label: t('apiTestDebug.assertion'),
|
||||
value: ResponseComposition.ASSERTION,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
];
|
||||
|
||||
const activeTab = defineModel<ResponseComposition>('activeTab', {
|
||||
required: true,
|
||||
default: ResponseComposition.BODY,
|
||||
|
|
Loading…
Reference in New Issue