fix(接口测试): 修复导入页面保留swagger上次配置参数记录问题

--bug=1021412--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021412
This commit is contained in:
guoyuqi 2023-01-12 16:50:14 +08:00 committed by xiaomeinvG
parent fba6283ca9
commit 248659080d
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,7 @@
<div>{{ $t('api_test.api_import.data_format') }}</div> <div>{{ $t('api_test.api_import.data_format') }}</div>
<el-radio-group v-model="selectedPlatformValue" @input="clearUrParameter"> <el-radio-group v-model="selectedPlatformValue" @input="clearUrParameter">
<span v-for="(item, index) in platforms" :key="index"> <span v-for="(item, index) in platforms" :key="index">
<el-radio v-if="!isScenarioModel || item.name != 'Swagger'" :label="item.value">{{ item.name }}</el-radio> <el-radio v-if="!isScenarioModel || item.name !== 'Swagger'" :label="item.value">{{ item.name }}</el-radio>
</span> </span>
</el-radio-group> </el-radio-group>
@ -480,6 +480,7 @@ export default {
if (value !== 'Swagger2') { if (value !== 'Swagger2') {
this.clearAuthInfo(); this.clearAuthInfo();
this.authEnable = false; this.authEnable = false;
this.swaggerUrlEnable = false;
} }
}, },
buildParam() { buildParam() {
@ -519,7 +520,9 @@ export default {
swaggerUrl: '', swaggerUrl: '',
modeId: this.formData.modeId, modeId: this.formData.modeId,
}; };
this.clearAuthInfo();
this.swaggerUrlEnable = false; this.swaggerUrlEnable = false;
this.authEnable = false;
this.selectedPlatformValue = 'Metersphere'; this.selectedPlatformValue = 'Metersphere';
this.fileList = []; this.fileList = [];
removeGoBackListener(this.close); removeGoBackListener(this.close);