From d29667f185040a26f02a0172eb99b80bf463b23c Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 23 Aug 2024 15:04:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api-test/scenario/components/common/customApiDrawer.vue | 5 ++++- .../api-test/scenario/components/common/customCaseDrawer.vue | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue index cc4e1bee36..d80d098340 100644 --- a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue +++ b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue @@ -494,7 +494,7 @@ stepName: '', resourceId: '', customizeRequest: true, - customizeRequestEnvEnable: false, + customizeRequestEnvEnable: true, protocol: 'HTTP', url: '', activeTab: RequestComposition.HEADER, @@ -819,6 +819,7 @@ // 隐藏多余的字段 fApi.value?.hidden(true, currentFormFields?.filter((e) => !fields.includes(e)) || []); } + fApi.value?.refresh(); // 刷新表单,避免字段显隐切换后部分字段不显示 return fields; } @@ -1305,6 +1306,7 @@ responseActiveTab: ResponseComposition.BODY, stepId: props.step?.uniqueId || '', uniqueId: props.step?.uniqueId || '', + customizeRequestEnvEnable: true, isNew: false, }); if (_stepType.value.isQuoteApi) { @@ -1324,6 +1326,7 @@ ...defaultApiParams, stepId: id, uniqueId: id, + customizeRequestEnvEnable: false, protocol: localProtocol?.length && protocolOptions.value.some((item) => item.value === localProtocol) ? localProtocol diff --git a/frontend/src/views/api-test/scenario/components/common/customCaseDrawer.vue b/frontend/src/views/api-test/scenario/components/common/customCaseDrawer.vue index ecfefdf8c9..2166a8fe96 100644 --- a/frontend/src/views/api-test/scenario/components/common/customCaseDrawer.vue +++ b/frontend/src/views/api-test/scenario/components/common/customCaseDrawer.vue @@ -344,7 +344,7 @@ stepId: '', uniqueId: '', resourceId: '', - customizeRequestEnvEnable: false, + customizeRequestEnvEnable: true, protocol: 'HTTP', url: '', activeTab: RequestComposition.HEADER, @@ -663,6 +663,7 @@ // 隐藏多余的字段 fApi.value?.hidden(true, currentFormFields?.filter((e) => !fields.includes(e)) || []); } + fApi.value?.refresh(); // 刷新表单,避免字段显隐切换后部分字段不显示 return fields; } @@ -1005,6 +1006,7 @@ resourceId: res.id, stepId: activeStep.value?.id || '', uniqueId: activeStep.value?.uniqueId || '', + customizeRequestEnvEnable: true, ...parseRequestBodyResult, }; nextTick(() => {