diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 9fbf4a233..f55aed8cc 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -175,10 +175,7 @@ export default defineComponent({ const Com = componentMap['Divider'] as ReturnType let labelName = item?.label || '' if(item?.label){ - labelName = t(`ts.${item?.label}`) - if(labelName === 'ts.' + item?.label){ - labelName = item?.label - } + labelName = t(`ts.${item?.label}`).replace('ts.','') } return isDivider ? ( {labelName} @@ -227,18 +224,12 @@ export default defineComponent({ if (item?.labelMessage) { let labelName = item.label || '' if(item.label){ - labelName = t(`ts.${item.label}`) - if(labelName === 'ts.' + item.label){ - labelName = item.label - } + labelName = t(`ts.${item.label}`).replace('ts.','') } let labelMessage = item.labelMessage || '' if(item.labelMessage){ - labelMessage = t(`ts.${item.labelMessage}`) - if(labelMessage === 'ts.' + item.labelMessage){ - labelMessage = item.labelMessage - } + labelMessage = t(`ts.${item.labelMessage}`).replace('ts.','') } formItemSlots.label = () => { return ( @@ -367,10 +358,7 @@ export default defineComponent({ } let labelName = item.label || '' if(item.label){ - labelName = t(`ts.${item.label}`) - if(labelName === 'ts.' + item.label){ - labelName = item.label - } + labelName = t(`ts.${item.label}`).replace('ts.','') } return ( diff --git a/src/components/Form/src/components/useRenderSelect.tsx b/src/components/Form/src/components/useRenderSelect.tsx index 4a8a18a79..30f6d73d6 100644 --- a/src/components/Form/src/components/useRenderSelect.tsx +++ b/src/components/Form/src/components/useRenderSelect.tsx @@ -35,10 +35,7 @@ export const useRenderSelect = (slots: Slots) => { const { label, value, ...other } = option const zhName = labelAlias ? option[labelAlias] : label;//中文名称 - let labelName = t(`ts.${zhName}`) - if(labelName === 'ts.' + zhName){ - labelName = zhName - } + let labelName = t(`ts.${zhName}`).replace('ts.','') return ( { let labelName = schema.label || '' if(schema.label){ - labelName = t(`ts.${schema.label}`) - if(labelName === 'ts.' + schema.label){ - labelName = ' '+schema.label - }else{ - labelName = ' ' + labelName - } + labelName = ' '+t(`ts.${schema.label}`).replace('ts.','') } if (textMap.includes(schema?.component as string)) { diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue index af95f8b2d..5b785c699 100644 --- a/src/components/Table/src/Table.vue +++ b/src/components/Table/src/Table.vue @@ -283,10 +283,7 @@ export default defineComponent({ return [...[renderTableExpand()], ...[renderTableSelection()]].concat( (columnsChildren || columns).map((v) => { const zhName = v.label || '';//中文名称 - let labelName = t(`ts.${v.label}`) - if(labelName === 'ts.' + zhName){ - labelName = zhName - } + let labelName = t(`ts.${v.label}`).replace('ts.','') // 自定生成序号 if (v.type === 'index') { return ( diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 73101cc39..1a2ad0cca 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -289,7 +289,7 @@ export function mainListDisableBtn(option:any) { // 主列表-中止按钮1 export function mainListSuspend1Btn(option:any) { return __defaultBtnOption(option,{ - label: t(`ts.中止`), + label: t(`ts.中止`).replace('ts.',''), name: 'suspend', hide: false, type: 'danger', @@ -624,7 +624,7 @@ export function mainListPurchasePlanModBtn(option:any) { // 主列表-要货计划流程-下架按钮 export function mainListPurchasePlanWitBtn(option:any) { return __defaultBtnOption(option,{ - label: t(`ts.下架`), + label: t(`ts.下架`).replace('ts.',''), name: 'mainPurPlanWit', hide: false, type: 'danger', diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index 2c2c33fd7..a28e0101a 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -15,7 +15,7 @@