diff --git a/frontend/src/views/api-test/components/requestComposition/index.vue b/frontend/src/views/api-test/components/requestComposition/index.vue index 818ca5dab4..1599e6296f 100644 --- a/frontend/src/views/api-test/components/requestComposition/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/index.vue @@ -218,6 +218,20 @@ +
+ +
+ {{ t('apiTestManagement.apiNameRequired') }} +
+
@@ -1584,6 +1598,7 @@ const apiBaseFormRef = ref>(); const isUrlError = ref(false); + const isNameError = ref(false); const tempApiDetail = ref(); const saveNewApiModalVisible = ref(false); @@ -1592,7 +1607,12 @@ isUrlError.value = true; return; } + if (requestVModel.value.name === '') { + isNameError.value = true; + return; + } isUrlError.value = false; + isNameError.value = false; if (value === 'saveAsApi') { const params = makeRequestParams(); tempApiDetail.value = { @@ -1726,6 +1746,14 @@ color: rgb(var(--danger-6)); line-height: 16px; } + .name-input-tip { + @apply w-full; + + margin-top: 4px; + font-size: 12px; + color: rgb(var(--danger-6)); + line-height: 16px; + } .request-tab-and-response { overflow-x: hidden; overflow-y: auto; diff --git a/frontend/src/views/api-test/management/components/management/api/apiBaseForm.vue b/frontend/src/views/api-test/management/components/management/api/apiBaseForm.vue index 44f606e937..dcd736fc4d 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiBaseForm.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiBaseForm.vue @@ -2,7 +2,7 @@ - - + -->