Skip to content

Badge 徽标

用于展示数字计数、小红点提示或独立状态指示器。

基础用法

5120

小红点

链接文字

状态徽标

默认(default)处理中(processing)成功(success)警告(warning)错误(error)

溢出与尺寸

99+199+8

API

Props

属性类型默认值说明
countnumber显示的数字
overflowCountnumber99封顶数字,超出后显示 {overflowCount}+
dotbooleanfalse不显示数字,仅显示小红点
statusBadgeStatus独立状态点类型(无子元素时生效)
textstring状态点旁的文字说明
sizeBadgeSize'default'尺寸:default | small
showZerobooleanfalsecount 为 0 时是否显示
offset[number, number]数字徽标的偏移量 [x, y](像素)
classNamestring自定义 class
styleobject自定义样式

Slots

插槽说明
default被包裹的子元素

类型

ts
type BadgeStatus = 'default' | 'processing' | 'error' | 'warning' | 'success'
type BadgeSize   = 'default' | 'small'

AUI Vue Components — Built with Vue 3 & VitePress