diff --git a/components/config-provider/__tests__/__snapshots__/form.test.js.snap b/components/config-provider/__tests__/__snapshots__/form.test.js.snap index 32c760dbff..d04898ef93 100644 --- a/components/config-provider/__tests__/__snapshots__/form.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/form.test.js.snap @@ -18,6 +18,7 @@ exports[`ConfigProvider.Form form requiredMark set requiredMark optional 1`] = ` 年龄 (optional) diff --git a/components/form/FormItemLabel.tsx b/components/form/FormItemLabel.tsx index 884f0d9305..e4d654a927 100644 --- a/components/form/FormItemLabel.tsx +++ b/components/form/FormItemLabel.tsx @@ -88,7 +88,7 @@ const FormItemLabel: React.FC, ...restTooltipProps } = tooltipProps; const tooltipNode = ( - {React.cloneElement(icon, { className: `${prefixCls}-item-tooltip` })} + {React.cloneElement(icon, { className: `${prefixCls}-item-tooltip`, title: '' })} ); @@ -105,7 +105,7 @@ const FormItemLabel: React.FC {labelChildren} - + {formLocale?.optional || defaultLocale.Form?.optional} diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap index 2d2888d465..f293d38eab 100644 --- a/components/form/__tests__/__snapshots__/demo.test.js.snap +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -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="" > @@ -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="" > (optional)