diff --git a/frontend/src/views/api-test/components/environmentSelect.vue b/frontend/src/views/api-test/components/environmentSelect.vue index fa1b348791..b31ab4f0de 100644 --- a/frontend/src/views/api-test/components/environmentSelect.vue +++ b/frontend/src/views/api-test/components/environmentSelect.vue @@ -30,8 +30,7 @@ const appStore = useAppStore(); const { openNewPage } = useOpenNewPage(); - const currentEnv = ref(''); - + const currentEnv = defineModel('currentEnv', { default: '' }); const currentEnvConfig = ref(); const envLoading = ref(false); const envOptions = ref([]); @@ -54,8 +53,8 @@ label: item.name, value: item.id, })); - currentEnv.value = res[0]?.id || ''; - initEnvironment(); + currentEnv.value = currentEnv.value.length ? currentEnv.value : res[0]?.id; + await initEnvironment(); } catch (error) { // eslint-disable-next-line no-console console.log(error); diff --git a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue index a88b79da80..5e5ae9f326 100644 --- a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue +++ b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue @@ -3,7 +3,7 @@ +