fix(接口测试): 导入弹窗按钮样式调整

This commit is contained in:
baiqi 2024-10-31 15:04:10 +08:00 committed by Craftsman
parent 364f7efa4c
commit dcb701e95e
2 changed files with 47 additions and 30 deletions

View File

@ -9,17 +9,20 @@
@close="close"> @close="close">
<div class="header-bar"> <div class="header-bar">
<div>{{ $t('api_test.api_import.data_format') }}</div> <div>{{ $t('api_test.api_import.data_format') }}</div>
<el-radio-group v-model="selectedPlatformValue"> <div class="header-bar-btn">
<el-radio v-for="(item, index) in platforms" :key="index" :label="item.value">{{ item.name }}</el-radio> <el-radio-group v-model="selectedPlatformValue">
</el-radio-group> <el-radio-button v-for="(item, index) in platforms" :key="index" :label="item.value">{{
item.name
<div class="operate-button"> }}</el-radio-button>
<el-button class="save-button" type="primary" plain @click="save"> </el-radio-group>
{{ $t('commons.save') }} <div class="operate-button">
</el-button> <el-button class="save-button" type="primary" plain @click="save">
<el-button class="cancel-button" type="warning" plain @click="visible = false"> {{ $t('commons.save') }}
{{ $t('commons.cancel') }} </el-button>
</el-button> <el-button class="cancel-button" type="warning" plain @click="visible = false">
{{ $t('commons.cancel') }}
</el-button>
</div>
</div> </div>
</div> </div>
@ -38,7 +41,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.import_mode')" prop="modeId"> <el-form-item :label="$t('commons.import_mode')" prop="modeId">
<el-select size="small" v-model="formData.modeId" class="project-select" clearable style="width: 100%"> <el-select size="small" v-model="formData.modeId" class="project-select" clearable style="width: 100%">
<el-option v-for="item in modeOptions" :key="item.id" :label="item.name" :value="item.id"/> <el-option v-for="item in modeOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
<el-checkbox size="mini" v-if="formData.modeId === 'fullCoverage'" v-model="formData.coverModule"> <el-checkbox size="mini" v-if="formData.modeId === 'fullCoverage'" v-model="formData.coverModule">
{{ this.$t('commons.cover_scenario') }} {{ this.$t('commons.cover_scenario') }}
@ -418,6 +421,11 @@ export default {
.header-bar { .header-bar {
padding: 10px 30px; padding: 10px 30px;
.header-bar-btn {
display: flex;
align-items: center;
justify-content: space-between;
}
} }
.api-import :deep(.el-dialog__body) { .api-import :deep(.el-dialog__body) {
@ -432,7 +440,6 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
.dialog-footer { .dialog-footer {
float: right; float: right;
} }

View File

@ -10,19 +10,24 @@
:destroy-on-close="true"> :destroy-on-close="true">
<div class="header-bar"> <div class="header-bar">
<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"> <div class="header-bar-btn">
<span v-for="(item, index) in platforms" :key="index"> <el-radio-group v-model="selectedPlatformValue" @input="clearUrParameter">
<el-radio v-if="!isScenarioModel || item.name !== 'Swagger'" :label="item.value">{{ item.name }}</el-radio> <el-radio-button
</span> v-for="(item, index) in platforms"
</el-radio-group> :key="index"
v-if="!isScenarioModel || item.name !== 'Swagger'"
<div class="operate-button"> :label="item.value"
<el-button class="save-button" type="primary" plain @click="save"> >{{ item.name }}</el-radio-button
{{ $t('commons.save') }} >
</el-button> </el-radio-group>
<el-button class="cancel-button" type="warning" plain @click="visible = false"> <div class="operate-button">
{{ $t('commons.cancel') }} <el-button class="save-button" type="primary" plain @click="save">
</el-button> {{ $t('commons.save') }}
</el-button>
<el-button class="cancel-button" type="warning" plain @click="visible = false">
{{ $t('commons.cancel') }}
</el-button>
</div>
</div> </div>
</div> </div>
@ -106,7 +111,7 @@
:show-desc="true" :show-desc="true"
:isShowEnable="isShowEnable" :isShowEnable="isShowEnable"
:suggestions="headerSuggestions" :suggestions="headerSuggestions"
:items="headers"/> :items="headers" />
<!--query 参数--> <!--query 参数-->
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<span>{{ $t('api_test.definition.request.query_param') }}{{ $t('api_test.api_import.optional') }}</span> <span>{{ $t('api_test.definition.request.query_param') }}{{ $t('api_test.api_import.optional') }}</span>
@ -469,9 +474,9 @@ export default {
clearAuthInfo() { clearAuthInfo() {
this.headers = []; this.headers = [];
this.queryArguments = []; this.queryArguments = [];
this.headers.push(new KeyValue({enable: true})); this.headers.push(new KeyValue({ enable: true }));
this.queryArguments.push(new KeyValue({enable: true})); this.queryArguments.push(new KeyValue({ enable: true }));
this.authConfig = {hashTree: [], authManager: {}}; this.authConfig = { hashTree: [], authManager: {} };
this.$refs.importAuth.initData(); this.$refs.importAuth.initData();
}, },
changeAuthEnable() { changeAuthEnable() {
@ -599,6 +604,11 @@ export default {
.header-bar { .header-bar {
padding: 10px 15px; padding: 10px 15px;
.header-bar-btn {
display: flex;
align-items: center;
justify-content: space-between;
}
} }
.api-import :deep(.el-dialog__body) { .api-import :deep(.el-dialog__body) {