Skip to content

Badge 徽标

图标或文字上的数字/状态标记。

基础用法

5099+
vue
<ABadge :value="5"><AButton>消息</AButton></ABadge>
<ABadge :value="120" :max="99"><AButton>溢出</AButton></ABadge>
<ABadge dot><AButton type="primary">在线</AButton></ABadge>

各种类型

33333
vue
<ABadge :value="3" type="success"> ... </ABadge>
<ABadge :value="3" type="error"> ... </ABadge>

API

属性类型默认值说明
valuestring | number徽标内容
maxnumber99最大值,超出显示 99+
dotbooleanfalse圆点模式
showbooleantrue是否显示
type'default' | 'primary' | 'info' | 'success' | 'warning' | 'error''error'类型
showZerobooleanfalse值为 0 是否显示
processingbooleanfalse处理中动画

Released under the MIT License.