From 4fab6f793024df264248ec066c1f8991842980b8 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 14 Feb 2023 15:37:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E7=8E=AF=E5=A2=83=E5=8F=98=E6=9B=B4=E5=90=8E=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=9B=B4=E6=96=B0=E5=9C=BA=E6=99=AF=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/automation/scenario/EditApiScenario.vue | 1 + .../src/business/automation/scenario/EnvPopover.vue | 4 ++++ .../frontend/src/business/automation/scenario/EnvSelect.vue | 6 +++--- .../src/components/environment/ApiEnvironmentConfig.vue | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index c24ec8e429..420996a4fd 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -140,6 +140,7 @@ @setProjectEnvMap="setProjectEnvMap" @setEnvGroup="setEnvGroup" @showPopover="showPopover" + @saveRefresh="setDomain" :has-option-group="true" ref="envPopover" class="ms-message-right" /> diff --git a/api-test/frontend/src/business/automation/scenario/EnvPopover.vue b/api-test/frontend/src/business/automation/scenario/EnvPopover.vue index dc3e6e69f9..8673311625 100644 --- a/api-test/frontend/src/business/automation/scenario/EnvPopover.vue +++ b/api-test/frontend/src/business/automation/scenario/EnvPopover.vue @@ -17,6 +17,7 @@ :env-map="envMap" :project-list="projectList" @close="visible = false" + @saveRefresh="saveRefresh" @setProjectEnvMap="setProjectEnvMap" v-show="!radio || radio === ENV_TYPE.JSON" :btnStyle="btnStyle" @@ -184,6 +185,9 @@ export default { radioChange(val) { this.$emit('update:environmentType', val); }, + saveRefresh() { + this.$emit('saveRefresh'); + }, }, }; diff --git a/api-test/frontend/src/business/automation/scenario/EnvSelect.vue b/api-test/frontend/src/business/automation/scenario/EnvSelect.vue index 8384000693..23c89b5c7d 100644 --- a/api-test/frontend/src/business/automation/scenario/EnvSelect.vue +++ b/api-test/frontend/src/business/automation/scenario/EnvSelect.vue @@ -22,7 +22,7 @@ @@ -215,7 +215,7 @@ export default { return true; }, environmentConfigClose() { - // todo 关闭处理 + this.$emit('saveRefresh'); }, }, }; diff --git a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue index 8b92e0a4f8..8f42f8db6c 100644 --- a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue @@ -245,6 +245,7 @@ export default { }, save() { this.$refs.environmentEdit.save(); + this.$emit('saveRefresh'); }, close() { this.$emit('close');