diff --git a/src/components/Form/src/components/useRenderSelect.tsx b/src/components/Form/src/components/useRenderSelect.tsx index 59b72e687..4a8a18a79 100644 --- a/src/components/Form/src/components/useRenderSelect.tsx +++ b/src/components/Form/src/components/useRenderSelect.tsx @@ -3,6 +3,7 @@ import { ComponentOptions } from '@/types/components' import { ElOption, ElOptionGroup } from 'element-plus' import { getSlot } from '@/utils/tsxHelper' import { Slots } from 'vue' +const { t } = useI18n() export const useRenderSelect = (slots: Slots) => { // 渲染 select options @@ -33,11 +34,16 @@ export const useRenderSelect = (slots: Slots) => { const valueAlias = item?.componentProps?.optionsAlias?.valueField const { label, value, ...other } = option + const zhName = labelAlias ? option[labelAlias] : label;//中文名称 + let labelName = t(`ts.${zhName}`) + if(labelName === 'ts.' + zhName){ + labelName = zhName + } return ( {{ diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue index 29ed5d067..03c91faa9 100644 --- a/src/components/ImportForm/src/ImportForm.vue +++ b/src/components/ImportForm/src/ImportForm.vue @@ -1,6 +1,6 @@