parent
2112ebbe33
commit
67f438ddb3
|
@ -71,11 +71,11 @@
|
||||||
const innerLanguageType = useVModel(props, 'languagesType', emit);
|
const innerLanguageType = useVModel(props, 'languagesType', emit);
|
||||||
|
|
||||||
const languages = [
|
const languages = [
|
||||||
{ text: 'beanshellJSR223', value: LanguageEnum.BEANSHELL_JSR233 },
|
{ text: 'BeanShell-JSR223', value: LanguageEnum.BEANSHELL_JSR233 },
|
||||||
{ text: 'beanshell', value: LanguageEnum.BEANSHELL },
|
{ text: 'BeanShell', value: LanguageEnum.BEANSHELL },
|
||||||
{ text: 'python', value: LanguageEnum.PYTHON },
|
{ text: 'Python3', value: LanguageEnum.PYTHON },
|
||||||
{ text: 'groovy', value: LanguageEnum.GROOVY },
|
{ text: 'Groovy', value: LanguageEnum.GROOVY },
|
||||||
{ text: 'javascript', value: LanguageEnum.JAVASCRIPT },
|
{ text: 'JavaScript', value: LanguageEnum.JAVASCRIPT },
|
||||||
];
|
];
|
||||||
|
|
||||||
function expandedHandler() {
|
function expandedHandler() {
|
||||||
|
|
|
@ -251,6 +251,7 @@
|
||||||
formalParameterVars,
|
formalParameterVars,
|
||||||
JMeterAllGroup,
|
JMeterAllGroup,
|
||||||
JMeterAllVars,
|
JMeterAllVars,
|
||||||
|
JMeterVariableGroup,
|
||||||
mockAllGroup,
|
mockAllGroup,
|
||||||
mockAllParams,
|
mockAllParams,
|
||||||
mockFunctions,
|
mockFunctions,
|
||||||
|
@ -258,6 +259,7 @@
|
||||||
} from './config';
|
} from './config';
|
||||||
import type { MockParamInputGroupItem, MockParamItem } from './types';
|
import type { MockParamInputGroupItem, MockParamItem } from './types';
|
||||||
import type { AutoComplete, CascaderOption, FormInstance } from '@arco-design/web-vue';
|
import type { AutoComplete, CascaderOption, FormInstance } from '@arco-design/web-vue';
|
||||||
|
import { string } from 'fast-glob/out/utils';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
value: string;
|
value: string;
|
||||||
|
@ -500,7 +502,30 @@
|
||||||
paramFormRef.value?.clearValidate();
|
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() {
|
function cancel() {
|
||||||
paramFormRef.value?.resetFields();
|
paramFormRef.value?.resetFields();
|
||||||
|
|
|
@ -27,7 +27,11 @@
|
||||||
>
|
>
|
||||||
<template #label="{ tab }">
|
<template #label="{ tab }">
|
||||||
<apiMethodName :method="tab.protocol === 'HTTP' ? tab.method : tab.protocol" class="mr-[4px]" />
|
<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>
|
</template>
|
||||||
</MsEditableTab>
|
</MsEditableTab>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue