parent
2112ebbe33
commit
67f438ddb3
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
>
|
||||
<template #label="{ tab }">
|
||||
<apiMethodName :method="tab.protocol === 'HTTP' ? tab.method : tab.protocol" class="mr-[4px]" />
|
||||
{{ tab.label }}
|
||||
<a-tooltip :content="tab.name || tab.label" :mouse-enter-delay="500">
|
||||
<div class="one-line-text max-w-[144px]">
|
||||
{{ tab.name || tab.label }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</MsEditableTab>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue