From f6c4c989cc609541a212b86b4992b8e5d1a99d57 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Sun, 8 Oct 2023 18:43:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E7=8E=AF=E5=A2=83=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9C=AA=E6=9B=B4=E6=96=B0=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1031139 --user=王孝刚 【接口测试】case-运行环境配置修改通用配置参数-返回test运行环境配置查看-未更新 https://www.tapd.cn/55049933/s/1423466 --- .../src/components/environment/ApiEnvironmentConfig.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue index 2ddb9f1eb3..7200126dba 100644 --- a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue @@ -190,14 +190,15 @@ export default { this.$refs.environmentItems.itemSelected(this.environments.length - 1, newEnvironment); }, environmentSelected(environment) { - this.$refs.environmentEdit.clearValidate(); + if (this.$refs.environmentEdit) { + this.$refs.environmentEdit.clearValidate(); + } this.getEnvironment(environment); }, getEnvironments() { if (this.projectId) { this.result = getEnvironmentByProjectId(this.projectId).then(response => { this.environments = response.data; - this.currentEnvironment.id = null; if (this.environments.length > 0) { if (this.selectEnvironmentId) { const index = this.environments.findIndex(e => e.id === this.selectEnvironmentId); @@ -228,6 +229,7 @@ export default { }, save() { this.$refs.environmentEdit.save(); + this.currentEnvironment = null; }, close() { this.$emit('close'); @@ -235,6 +237,7 @@ export default { this.visible = false; } this.$refs.environmentEdit.clearValidate(); + this.currentEnvironment = null; removeGoBackListener(this.close); this.isCopy = false; },