mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: formItem label translate error (#5300)
Co-authored-by: dqc <qianchuan.deng@gmail.com>
This commit is contained in:
parent
ed7d420e51
commit
99cf50d80a
@ -966,9 +966,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
|||||||
{label
|
{label
|
||||||
? render(
|
? render(
|
||||||
'label',
|
'label',
|
||||||
typeof label === 'string'
|
typeof label === 'string' ? filter(label, data) : label
|
||||||
? filter(__(label), data)
|
|
||||||
: label
|
|
||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
{required && (label || labelRemark) ? (
|
{required && (label || labelRemark) ? (
|
||||||
@ -1096,9 +1094,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
|||||||
{label
|
{label
|
||||||
? render(
|
? render(
|
||||||
'label',
|
'label',
|
||||||
typeof label === 'string'
|
typeof label === 'string' ? filter(label, data) : label
|
||||||
? filter(__(label), data)
|
|
||||||
: label
|
|
||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
{required && (label || labelRemark) ? (
|
{required && (label || labelRemark) ? (
|
||||||
@ -1220,9 +1216,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
|||||||
{label
|
{label
|
||||||
? render(
|
? render(
|
||||||
'label',
|
'label',
|
||||||
typeof label === 'string'
|
typeof label === 'string' ? filter(label, data) : label
|
||||||
? filter(__(label), data)
|
|
||||||
: label
|
|
||||||
)
|
)
|
||||||
: label}
|
: label}
|
||||||
{required && (label || labelRemark) ? (
|
{required && (label || labelRemark) ? (
|
||||||
@ -1347,7 +1341,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
|||||||
<span>
|
<span>
|
||||||
{render(
|
{render(
|
||||||
'label',
|
'label',
|
||||||
typeof label === 'string' ? filter(__(label), data) : label
|
typeof label === 'string' ? filter(label, data) : label
|
||||||
)}
|
)}
|
||||||
{required && (label || labelRemark) ? (
|
{required && (label || labelRemark) ? (
|
||||||
<span className={cx(`Form-star`)}>*</span>
|
<span className={cx(`Form-star`)}>*</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user