diff --git a/frontend/src/components/business/ms-params-input/index.vue b/frontend/src/components/business/ms-params-input/index.vue index f4dcafaa03..37b79d3851 100644 --- a/frontend/src/components/business/ms-params-input/index.vue +++ b/frontend/src/components/business/ms-params-input/index.vue @@ -378,10 +378,34 @@ }; const paramForm = ref>({ ...defaultParamForm }); const paramFormRef = ref(); - const paramTypeOptions: CascaderOption[] = cloneDeep(mockAllGroup); const paramFuncOptions: MockParamItem[] = cloneDeep(mockFunctions); const currentParamsInputGroup = ref([]); + function genMockParamTypeOptions() { + // 国际化处理 + const mockParamTypeOptions: { label: string; value: string; children: any }[] = []; + mockAllGroup.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, + }; + mockParamTypeOptions.push(option); + }); + return mockParamTypeOptions; + } + const paramTypeOptions = genMockParamTypeOptions(); + /** * 切换变量类型,设置变量输入框的输入组 * @param val 变量类型 diff --git a/frontend/src/views/api-test/components/condition/content.vue b/frontend/src/views/api-test/components/condition/content.vue index 14f08de1ff..7258c8ba0a 100644 --- a/frontend/src/views/api-test/components/condition/content.vue +++ b/frontend/src/views/api-test/components/condition/content.vue @@ -373,6 +373,7 @@ v-model:model-value="record.expression" class="ms-params-input" :max-length="255" + :placeholder="t('ms.paramsInput.commonPlaceholder')" size="mini" @input="() => handleExpressionChange(rowIndex)" @change="() => handleExpressionChange(rowIndex)" diff --git a/frontend/src/views/project-management/commonScript/index.vue b/frontend/src/views/project-management/commonScript/index.vue index 65a14fae80..706b7ef1f5 100644 --- a/frontend/src/views/project-management/commonScript/index.vue +++ b/frontend/src/views/project-management/commonScript/index.vue @@ -106,7 +106,7 @@ CommonScriptItem, ParamsRequestType, } from '@/models/projectManagement/commonScript'; - import { TableKeyEnum } from '@/enums/tableEnum'; + import { ColumnEditTypeEnum, TableKeyEnum } from '@/enums/tableEnum'; const appStore = useAppStore(); const currentProjectId = computed(() => appStore.currentProjectId); @@ -137,6 +137,7 @@ dataIndex: 'description', width: 200, showDrag: true, + showTooltip: true, }, { title: 'project.commonScript.enable',