From e6d86df3a9a501319bd4de7991d5d1d8ae1600d4 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Wed, 24 May 2023 16:58:59 +0800 Subject: [PATCH] fix: spin icon in Badge should have correct animation (#42575) --- components/badge/style/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/badge/style/index.ts b/components/badge/style/index.ts index 78b00fafa9..f474ee2da9 100644 --- a/components/badge/style/index.ts +++ b/components/badge/style/index.ts @@ -1,8 +1,8 @@ import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../theme/internal'; -import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal'; import { resetComponent } from '../../style'; +import type { FullToken, GenerateStyle } from '../../theme/internal'; +import { genComponentStyleHook, genPresetColor, mergeToken } from '../../theme/internal'; interface BadgeToken extends FullToken<'Badge'> { badgeFontHeight: number; @@ -150,9 +150,9 @@ const genSharedBadgeStyle: GenerateStyle = (token: BadgeToken): CSSO insetInlineEnd: 0, transform: 'translate(50%, -50%)', transformOrigin: '100% 0%', - [`${iconCls}-spin`]: { + [`&${iconCls}-spin`]: { animationName: antBadgeLoadingCircle, - animationDuration: token.motionDurationMid, + animationDuration: '1s', animationIterationCount: 'infinite', animationTimingFunction: 'linear', },