fix(接口测试): 导出文案调整

This commit is contained in:
baiqi 2024-09-14 10:39:51 +08:00 committed by Craftsman
parent 0c8b408bcb
commit 153a0482cf
3 changed files with 15 additions and 9 deletions

View File

@ -262,13 +262,18 @@
<div class="text-[var(--color-text-1)]">{{ item.name }}</div>
</div>
</div>
<div class="mb-[16px] flex items-center gap-[4px]">
<a-switch v-model:model-value="exportApiCase" size="small" />
{{ t('apiTestManagement.exportCase') }}
</div>
<div class="flex items-center gap-[4px]">
<a-switch v-model:model-value="exportApiMock" size="small" />
{{ t('apiTestManagement.exportMock') }}
<template v-if="exportPlatform === RequestExportFormat.MeterSphere">
<div class="mb-[16px] flex items-center gap-[4px]">
<a-switch v-model:model-value="exportApiCase" size="small" />
{{ t('apiTestManagement.exportCase') }}
</div>
<div class="flex items-center gap-[4px]">
<a-switch v-model:model-value="exportApiMock" size="small" />
{{ t('apiTestManagement.exportMock') }}
</div>
</template>
<div v-else-if="exportPlatform === RequestExportFormat.SWAGGER" class="text-[var(--color-text-4)]">
{{ t('apiTestManagement.exportSwaggerTip') }}
</div>
<template #footer>
<div class="flex justify-end">
@ -314,7 +319,6 @@
stopApiExport,
updateDefinition,
} from '@/api/modules/api-test/management';
import { getProjectInfo } from '@/api/modules/project-management/basicInfo';
import { getSocket } from '@/api/modules/project-management/commonScript';
import { useI18n } from '@/hooks/useI18n';
import useModal from '@/hooks/useModal';
@ -328,7 +332,7 @@
import { ApiDefinitionDetail, ApiDefinitionGetModuleParams } from '@/models/apiTest/management';
import { DragSortParams, ModuleTreeNode } from '@/models/common';
import { FilterType, ViewTypeEnum } from '@/enums/advancedFilterEnum';
import { RequestDefinitionStatus, RequestExportFormat, RequestImportFormat, RequestMethods } from '@/enums/apiEnum';
import { RequestDefinitionStatus, RequestExportFormat, RequestMethods } from '@/enums/apiEnum';
import { CacheTabTypeEnum } from '@/enums/cacheTabEnum';
import { TableKeyEnum } from '@/enums/tableEnum';
import { FilterRemoteMethodsEnum, FilterSlotNameEnum } from '@/enums/tableFilterEnum';

View File

@ -172,6 +172,7 @@ export default {
'apiTestManagement.pleaseInputJsonSchema': 'Please enter Schema first before automatically generating it.',
'apiTestManagement.protocolIsEmpty': 'The protocol is empty',
'apiTestManagement.protocolEmptyTip': 'List display data is empty, please select protocol',
'apiTestManagement.exportSwaggerTip': 'Swagger format only supports exporting HTTP protocol requests',
'case.execute.selectEnv': 'Select Environment',
'case.execute.defaultEnv': 'Default Environment',
'case.execute.newEnv': 'New Environment',

View File

@ -165,6 +165,7 @@ export default {
'apiTestManagement.pleaseInputJsonSchema': '请先输入 Schema 后再进行自动生成',
'apiTestManagement.protocolIsEmpty': '接口协议为空',
'apiTestManagement.protocolEmptyTip': '列表展示数据为空,请选择协议',
'apiTestManagement.exportSwaggerTip': 'Swagger格式仅支持导出HTTP协议的请求',
'case.execute.selectEnv': '环境选择',
'case.execute.defaultEnv': '默认环境',
'case.execute.newEnv': '新环境',