fix(接口定义): 修复test页面的环境编辑多个图标的缺陷

--bug=1016041 --user=王孝刚 【接口测试】接口定义 - TEST页面,选择环境下拉框 -
点开环境配置,变量名和类型后有个小圈 https://www.tapd.cn/55049933/s/1229274
This commit is contained in:
wxg0103 2022-08-22 15:04:35 +08:00 committed by f2c-ci-robot[bot]
parent e1a3c7c4c4
commit d6e1458b3b
2 changed files with 9 additions and 5 deletions

View File

@ -127,7 +127,6 @@ export default {
rules: {
method: [{required: true, message: this.$t('test_track.case.input_maintainer'), trigger: 'change'}],
path: [{required: true, message: this.$t('api_test.definition.request.path_info'), trigger: 'blur'}],
environmentId: [{required: true, message: this.$t('api_test.definition.request.run_env'), trigger: 'change'}],
},
runData: [],
reportId: "",
@ -218,6 +217,10 @@ export default {
}
},
runTest() {
if (!this.api.environmentId) {
this.$warning(this.$t('api_test.environment.select_environment'));
return;
}
this.$refs['apiData'].validate((valid) => {
if (valid) {
this.runLoading = true;

View File

@ -6,7 +6,7 @@
</div>
<el-card class="card-content">
<el-form :model="api" :rules="rules" ref="apiData" :inline="true" label-position="right" style="height: 100%">
<el-form :model="api" ref="apiData" :inline="true" label-position="right" style="height: 100%">
<!-- 操作按钮 -->
<el-dropdown split-button type="primary" class="ms-api-buttion" @click="handleCommand('add')"
@ -116,9 +116,6 @@ export default {
environments: [],
refreshSign: "",
createCase: "",
rules: {
environmentId: [{required: true, message: this.$t('api_test.definition.request.run_env'), trigger: 'change'}],
},
runData: [],
reportId: "",
showXpackCompnent: false,
@ -187,6 +184,10 @@ export default {
this.$emit('refresh');
},
runTest() {
if (!this.api.environmentId) {
this.$warning(this.$t('api_test.environment.select_environment'));
return;
}
this.$refs['apiData'].validate((valid) => {
if (valid) {
this.runLoading = true;