Skip to content

Badge 徽标

徽标数组件,常用行为对齐 Ant Design Badgestatus 默认背景 class 由 packages/ui/src/theme/componentTokens.ts 中的 badgeStatusBgClass 维护。

示例

封顶与状态色

API

属性说明类型默认值
count展示数字number0
dot显示小圆点booleanfalse
overflowCount超过后显示为 ${overflowCount}+number99
showZerocount 为 0 时是否展示booleanfalse
status状态色(作用于圆点或数字徽标背景)'default' | 'success' | 'processing' | 'error' | 'warning'-
offset相对默认位置的偏移 [x, y](px)[number, number]-
color自定义背景色string-