Skip to content

Tag 标签

用于标记状态、分类或属性。

js
import { Tag } from '@kupola/components/tag'

const tag = Tag({
  text: '启用',
  type: 'brand',
  closable: true,
})

document.body.appendChild(tag.element)

常用选项

选项说明
text文案
type类型
closable是否可关闭
onClose关闭回调

方法

  • close()
  • destroy()