mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
Merge pull request #4669 from VitoBeijing/master
feat: Form表单label国际化适配
This commit is contained in:
commit
e17a07be76
@ -35,7 +35,8 @@ function FormField(props: FormFieldProps) {
|
|||||||
hasError,
|
hasError,
|
||||||
isRequired,
|
isRequired,
|
||||||
label,
|
label,
|
||||||
description
|
description,
|
||||||
|
translate: __
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const errors = Array.isArray(props.errors)
|
const errors = Array.isArray(props.errors)
|
||||||
@ -58,7 +59,7 @@ function FormField(props: FormFieldProps) {
|
|||||||
{label ? (
|
{label ? (
|
||||||
<label className={cx(`Form-label`)}>
|
<label className={cx(`Form-label`)}>
|
||||||
<span>
|
<span>
|
||||||
{label}
|
{__(label)}
|
||||||
{isRequired && label ? (
|
{isRequired && label ? (
|
||||||
<span className={cx(`Form-star`)}>*</span>
|
<span className={cx(`Form-star`)}>*</span>
|
||||||
) : null}
|
) : null}
|
||||||
|
Loading…
Reference in New Issue
Block a user