From 2f2aca4c5bd139242a51445a161ddadcbd919068 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 14 Mar 2024 11:12:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=84=9A=E6=9C=AC=E8=B0=83=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-common-script/ms-addScriptDrawer.vue | 2 +- frontend/src/components/business/ms-common-script/utils.ts | 3 +-- frontend/src/views/project-management/commonScript/utils.ts | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue b/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue index 16d1edc212..8e96edc501 100644 --- a/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue +++ b/frontend/src/components/business/ms-common-script/ms-addScriptDrawer.vue @@ -259,7 +259,7 @@ }; await testCommonScript(params); } catch (error) { - console.log(error); + loading.value = false; } } // 提交测试请求 diff --git a/frontend/src/components/business/ms-common-script/utils.ts b/frontend/src/components/business/ms-common-script/utils.ts index 47715d22f4..a97bc626ae 100644 --- a/frontend/src/components/business/ms-common-script/utils.ts +++ b/frontend/src/components/business/ms-common-script/utils.ts @@ -40,8 +40,7 @@ export const SCRIPT_MENU: CommonScriptMenu[] = [ }, { title: t('project.processor.paramEnvironmentSetGlobalVariable'), - value: `vars.put(\${__metersphere_env_id}+"key","value"); - vars.put("key","value")`, + value: `vars.put(\${__metersphere_env_id}+"key","value");\nvars.put("key","value");`, }, { title: t('project.processor.insertPublicScript'), diff --git a/frontend/src/views/project-management/commonScript/utils.ts b/frontend/src/views/project-management/commonScript/utils.ts index 744a9783fd..7364f4485a 100644 --- a/frontend/src/views/project-management/commonScript/utils.ts +++ b/frontend/src/views/project-management/commonScript/utils.ts @@ -39,8 +39,7 @@ export const SCRIPT_MENU: CommonScriptMenu[] = [ }, { title: t('project.processor.paramEnvironmentSetGlobalVariable'), - value: `vars.put(\${__metersphere_env_id}+"key","value"); - vars.put("key","value")`, + value: `vars.put(\${__metersphere_env_id}+"key","value");\nvars.put("key","value");`, }, { title: t('project.processor.insertPublicScript'),