Skip to content

徽章 Badge

用于在目标元素(如图标、按钮、列表项等)上显示状态或数量提示的轻量型组件。

基础用法

支持 5 种按钮类型

10+
vue
<template>
  <bp-badge :count="20" :max-count="10">
    <IconNotification4Line fill="#595959" />
  </bp-badge>
</template>

Badge 属性

text自定义文本
String
--
count数值
Number
--
max-count最大显示数值
Number
99-
dot是否显示小圆点
Boolean
--
status状态类型
String
primary-
offset偏移量
Array
[-2, -6]-

Badge 插槽

default内容--