|
@ -175,10 +175,7 @@ export default defineComponent({ |
|
|
const Com = componentMap['Divider'] as ReturnType<typeof defineComponent> |
|
|
const Com = componentMap['Divider'] as ReturnType<typeof defineComponent> |
|
|
let labelName = item?.label || '' |
|
|
let labelName = item?.label || '' |
|
|
if(item?.label){ |
|
|
if(item?.label){ |
|
|
labelName = t(`ts.${item?.label}`) |
|
|
labelName = t(`ts.${item?.label}`).replace('ts.','') |
|
|
if(labelName === 'ts.' + item?.label){ |
|
|
|
|
|
labelName = item?.label |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
return isDivider ? ( |
|
|
return isDivider ? ( |
|
|
<Com {...{ contentPosition: 'left', ...item.componentProps }}>{labelName}</Com> |
|
|
<Com {...{ contentPosition: 'left', ...item.componentProps }}>{labelName}</Com> |
|
@ -227,18 +224,12 @@ export default defineComponent({ |
|
|
if (item?.labelMessage) { |
|
|
if (item?.labelMessage) { |
|
|
let labelName = item.label || '' |
|
|
let labelName = item.label || '' |
|
|
if(item.label){ |
|
|
if(item.label){ |
|
|
labelName = t(`ts.${item.label}`) |
|
|
labelName = t(`ts.${item.label}`).replace('ts.','') |
|
|
if(labelName === 'ts.' + item.label){ |
|
|
|
|
|
labelName = item.label |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let labelMessage = item.labelMessage || '' |
|
|
let labelMessage = item.labelMessage || '' |
|
|
if(item.labelMessage){ |
|
|
if(item.labelMessage){ |
|
|
labelMessage = t(`ts.${item.labelMessage}`) |
|
|
labelMessage = t(`ts.${item.labelMessage}`).replace('ts.','') |
|
|
if(labelMessage === 'ts.' + item.labelMessage){ |
|
|
|
|
|
labelMessage = item.labelMessage |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
formItemSlots.label = () => { |
|
|
formItemSlots.label = () => { |
|
|
return ( |
|
|
return ( |
|
@ -367,10 +358,7 @@ export default defineComponent({ |
|
|
} |
|
|
} |
|
|
let labelName = item.label || '' |
|
|
let labelName = item.label || '' |
|
|
if(item.label){ |
|
|
if(item.label){ |
|
|
labelName = t(`ts.${item.label}`) |
|
|
labelName = t(`ts.${item.label}`).replace('ts.','') |
|
|
if(labelName === 'ts.' + item.label){ |
|
|
|
|
|
labelName = item.label |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
return ( |
|
|
return ( |
|
|
<ElFormItem {...(item.formItemProps || {})} prop={item.field} label={labelName}> |
|
|
<ElFormItem {...(item.formItemProps || {})} prop={item.field} label={labelName}> |
|
|