diff --git a/frontend/src/components/business/ms-common-script/ms-script-menu.vue b/frontend/src/components/business/ms-common-script/ms-script-menu.vue index 6b01b1693b..dec9e98939 100644 --- a/frontend/src/components/business/ms-common-script/ms-script-menu.vue +++ b/frontend/src/components/business/ms-common-script/ms-script-menu.vue @@ -71,11 +71,11 @@ const innerLanguageType = useVModel(props, 'languagesType', emit); const languages = [ - { text: 'beanshellJSR223', value: LanguageEnum.BEANSHELL_JSR233 }, - { text: 'beanshell', value: LanguageEnum.BEANSHELL }, - { text: 'python', value: LanguageEnum.PYTHON }, - { text: 'groovy', value: LanguageEnum.GROOVY }, - { text: 'javascript', value: LanguageEnum.JAVASCRIPT }, + { text: 'BeanShell-JSR223', value: LanguageEnum.BEANSHELL_JSR233 }, + { text: 'BeanShell', value: LanguageEnum.BEANSHELL }, + { text: 'Python3', value: LanguageEnum.PYTHON }, + { text: 'Groovy', value: LanguageEnum.GROOVY }, + { text: 'JavaScript', value: LanguageEnum.JAVASCRIPT }, ]; function expandedHandler() { diff --git a/frontend/src/components/business/ms-params-input/index.vue b/frontend/src/components/business/ms-params-input/index.vue index 5d04dfe1e6..44f99bf544 100644 --- a/frontend/src/components/business/ms-params-input/index.vue +++ b/frontend/src/components/business/ms-params-input/index.vue @@ -251,6 +251,7 @@ formalParameterVars, JMeterAllGroup, JMeterAllVars, + JMeterVariableGroup, mockAllGroup, mockAllParams, mockFunctions, @@ -258,6 +259,7 @@ } from './config'; import type { MockParamInputGroupItem, MockParamItem } from './types'; import type { AutoComplete, CascaderOption, FormInstance } from '@arco-design/web-vue'; + import { string } from 'fast-glob/out/utils'; const props = defineProps<{ value: string; @@ -500,7 +502,30 @@ paramFormRef.value?.clearValidate(); } - const JMeterVarsOptions: CascaderOption[] = cloneDeep(JMeterAllGroup); + function genJMeterVarsOptions() { + // 国际化处理 + const JMeterVarsOptions: { label: string; value: string; children: any }[] = []; + JMeterAllGroup.forEach((item) => { + const optionChildren: { label: string; value: string }[] = []; + if (item.children) { + item.children.forEach((child) => { + const childOpt = { + label: t(child.label), + value: child.value, + }; + optionChildren.push(childOpt); + }); + } + const option = { + label: t(item.label), + value: item.value, + children: optionChildren, + }; + JMeterVarsOptions.push(option); + }); + return JMeterVarsOptions; + } + const JMeterVarsOptions = genJMeterVarsOptions(); function cancel() { paramFormRef.value?.resetFields(); diff --git a/frontend/src/views/api-test/debug/index.vue b/frontend/src/views/api-test/debug/index.vue index f33002f5fe..fe41740c03 100644 --- a/frontend/src/views/api-test/debug/index.vue +++ b/frontend/src/views/api-test/debug/index.vue @@ -27,7 +27,11 @@ >