diff --git a/frontend/src/business/components/api/test/components/import/ApiImport.vue b/frontend/src/business/components/api/test/components/import/ApiImport.vue index f4393fcda0..ef492536b7 100644 --- a/frontend/src/business/components/api/test/components/import/ApiImport.vue +++ b/frontend/src/business/components/api/test/components/import/ApiImport.vue @@ -47,8 +47,8 @@ - {{$t('api_test.api_import.file_size_limit')}} - @@ -133,10 +132,7 @@ ], projectId: [ {required: true, message: this.$t('api_test.select_project'), trigger: 'blur'}, - ], - file: [ - {required: true, message: this.$t('commons.please_upload'), trigger: 'blur'}, - ], + ] }, fileList: [] } @@ -208,6 +204,10 @@ Object.assign(param, this.formData); param.platform = this.selectedPlatformValue; param.useEnvironment = this.useEnvironment; + if (!param.file) { + this.$warning(this.$t('commons.please_upload')); + return ; + } this.result = this.$fileUpload('/api/import', param.file, param,response => { let res = response.data; this.$success(this.$t('test_track.case.import.success')); @@ -240,7 +240,15 @@ .api-upload { text-align: center; - display: inline-block; + margin: auto 0; + } + + .api-upload >>> .el-upload { + width: 100%; + } + + .api-upload >>> .el-upload-dragger { + width: 100%; } .el-radio-group { @@ -288,7 +296,7 @@ } .name-input { - width: 195px; + max-width: 195px; } .dialog-footer {