afc163
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
2 deletions
-
components/config-provider/__tests__/__snapshots__/form.test.js.snap
-
components/form/FormItemLabel.tsx
-
components/form/__tests__/__snapshots__/demo.test.js.snap
|
|
@ -18,6 +18,7 @@ exports[`ConfigProvider.Form form requiredMark set requiredMark optional 1`] = ` |
|
|
|
年龄 |
|
|
|
<span |
|
|
|
class="ant-form-item-optional" |
|
|
|
title="" |
|
|
|
> |
|
|
|
(optional) |
|
|
|
</span> |
|
|
|
|
|
@ -88,7 +88,7 @@ const FormItemLabel: React.FC<FormItemLabelProps & { required?: boolean; prefixC |
|
|
|
const { icon = <QuestionCircleOutlined />, ...restTooltipProps } = tooltipProps; |
|
|
|
const tooltipNode = ( |
|
|
|
<Tooltip {...restTooltipProps}> |
|
|
|
{React.cloneElement(icon, { className: `${prefixCls}-item-tooltip` })} |
|
|
|
{React.cloneElement(icon, { className: `${prefixCls}-item-tooltip`, title: '' })} |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
|
|
|
@ -105,7 +105,7 @@ const FormItemLabel: React.FC<FormItemLabelProps & { required?: boolean; prefixC |
|
|
|
labelChildren = ( |
|
|
|
<> |
|
|
|
{labelChildren} |
|
|
|
<span className={`${prefixCls}-item-optional`}> |
|
|
|
<span className={`${prefixCls}-item-optional`} title=""> |
|
|
|
{formLocale?.optional || defaultLocale.Form?.optional} |
|
|
|
</span> |
|
|
|
</> |
|
|
|
|
|
@ -3244,6 +3244,7 @@ exports[`renders ./components/form/demo/register.md correctly 1`] = ` |
|
|
|
aria-label="question-circle" |
|
|
|
class="anticon anticon-question-circle ant-form-item-tooltip" |
|
|
|
role="img" |
|
|
|
title="" |
|
|
|
> |
|
|
|
<svg |
|
|
|
aria-hidden="true" |
|
|
@ -3763,6 +3764,7 @@ exports[`renders ./components/form/demo/required-mark.md correctly 1`] = ` |
|
|
|
Required Mark |
|
|
|
<span |
|
|
|
class="ant-form-item-optional" |
|
|
|
title="" |
|
|
|
> |
|
|
|
(optional) |
|
|
|
</span> |
|
|
@ -3859,6 +3861,7 @@ exports[`renders ./components/form/demo/required-mark.md correctly 1`] = ` |
|
|
|
aria-label="question-circle" |
|
|
|
class="anticon anticon-question-circle ant-form-item-tooltip" |
|
|
|
role="img" |
|
|
|
title="" |
|
|
|
> |
|
|
|
<svg |
|
|
|
aria-hidden="true" |
|
|
@ -3913,6 +3916,7 @@ exports[`renders ./components/form/demo/required-mark.md correctly 1`] = ` |
|
|
|
aria-label="info-circle" |
|
|
|
class="anticon anticon-info-circle ant-form-item-tooltip" |
|
|
|
role="img" |
|
|
|
title="" |
|
|
|
> |
|
|
|
<svg |
|
|
|
aria-hidden="true" |
|
|
@ -3933,6 +3937,7 @@ exports[`renders ./components/form/demo/required-mark.md correctly 1`] = ` |
|
|
|
</span> |
|
|
|
<span |
|
|
|
class="ant-form-item-optional" |
|
|
|
title="" |
|
|
|
> |
|
|
|
(optional) |
|
|
|
</span> |
|
|
|