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'),