From f4686e70968189bba791925d9bda83ed7b9f6f11 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 13 Feb 2023 14:00:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=BA=E6=99=AF=E5=8F=98=E9=87=8F=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E5=A4=9A=E9=80=89=E6=93=8D=E4=BD=9C=E6=97=A0?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1022885 --user=赵勇 【接口测试】github#21668,api参数选择某环境变量选中操作不流畅,选中保存无效 https://www.tapd.cn/55049933/s/1334322 --- .../business/automation/scenario/component/ApiComponent.vue | 4 +++- .../business/definition/components/ApiVariableAdvance.vue | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index fcd472a25b..47f030faad 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -273,7 +273,9 @@ export default { this.request.projectId = getCurrentProjectID(); } this.request.customizeReq = this.isCustomizeReq; - this.request.currentScenarioId = this.currentScenario.id; + if (this.currentScenario) { + this.request.currentScenarioId = this.currentScenario.id; + } // 传递场景ID if (this.request.hashTree) { this.setOwnEnvironment(this.request.hashTree); diff --git a/api-test/frontend/src/business/definition/components/ApiVariableAdvance.vue b/api-test/frontend/src/business/definition/components/ApiVariableAdvance.vue index 3cec322ac4..5fefedde97 100644 --- a/api-test/frontend/src/business/definition/components/ApiVariableAdvance.vue +++ b/api-test/frontend/src/business/definition/components/ApiVariableAdvance.vue @@ -91,7 +91,6 @@ @row-click="edit" v-loading="loading" height="325px"> - @@ -263,6 +262,7 @@ import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer import MsAsideContainer from 'metersphere-frontend/src/components/MsAsideContainer'; import MsContainer from 'metersphere-frontend/src/components/MsContainer'; import { useApiStore } from '@/store'; +import OutsideClick from '../../automation/scenario/common/outside-click'; export default { name: 'MsApiVariableAdvance', @@ -292,6 +292,8 @@ export default { MsContainer, MsComponentConfig: () => import('../../automation/scenario/component/ComponentConfig'), }, + directives: { OutsideClick }, + data() { return { itemValueVisible: false, @@ -402,7 +404,6 @@ export default { return this.valuePlaceholder || this.$t('api_test.value'); }, }, - directives: {}, mounted() { this.prepareData(); },