From 99cf50d80ac6ed0b121df37d7589d5aaa025101a Mon Sep 17 00:00:00 2001 From: qianchuan Date: Mon, 5 Sep 2022 10:35:27 +0800 Subject: [PATCH] fix: formItem label translate error (#5300) Co-authored-by: dqc --- packages/amis-core/src/renderers/Item.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/amis-core/src/renderers/Item.tsx b/packages/amis-core/src/renderers/Item.tsx index 59b8ec037..f31f49b8a 100644 --- a/packages/amis-core/src/renderers/Item.tsx +++ b/packages/amis-core/src/renderers/Item.tsx @@ -966,9 +966,7 @@ export class FormItemWrap extends React.Component { {label ? render( 'label', - typeof label === 'string' - ? filter(__(label), data) - : label + typeof label === 'string' ? filter(label, data) : label ) : null} {required && (label || labelRemark) ? ( @@ -1096,9 +1094,7 @@ export class FormItemWrap extends React.Component { {label ? render( 'label', - typeof label === 'string' - ? filter(__(label), data) - : label + typeof label === 'string' ? filter(label, data) : label ) : null} {required && (label || labelRemark) ? ( @@ -1220,9 +1216,7 @@ export class FormItemWrap extends React.Component { {label ? render( 'label', - typeof label === 'string' - ? filter(__(label), data) - : label + typeof label === 'string' ? filter(label, data) : label ) : label} {required && (label || labelRemark) ? ( @@ -1347,7 +1341,7 @@ export class FormItemWrap extends React.Component { {render( 'label', - typeof label === 'string' ? filter(__(label), data) : label + typeof label === 'string' ? filter(label, data) : label )} {required && (label || labelRemark) ? ( *