Skip to content

Badge 徽标

用于展示计数、状态或短标签。

js
import { Badge } from '@kupola/components/badge'

const badge = Badge({
  text: '12',
  type: 'brand',
})

document.body.appendChild(badge.element)

常用选项

选项说明
text文案
typebrand / success / warning / error / info / neutral
dot是否为点状徽标

方法

  • destroy()