fix: fix badge animation end not trigger when parent is display:none (#33083)

Co-authored-by: songlin.chen <songlin.chen@leyantech.com>
This commit is contained in:
songlinn 2021-12-06 11:23:34 +08:00 committed by GitHub
parent 97fd6d5b03
commit d4b4edf8ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,7 +175,12 @@ const Badge: CompoundedComponent = ({
return ( return (
<span {...restProps} className={badgeClassName}> <span {...restProps} className={badgeClassName}>
{children} {children}
<CSSMotion visible={!isHidden} motionName={`${prefixCls}-zoom`} motionAppear={false}> <CSSMotion
visible={!isHidden}
motionName={`${prefixCls}-zoom`}
motionAppear={false}
motionDeadline={1000}
>
{({ className: motionClassName }) => { {({ className: motionClassName }) => {
const scrollNumberPrefixCls = getPrefixCls( const scrollNumberPrefixCls = getPrefixCls(
'scroll-number', 'scroll-number',