Skip to content

徽章

148字小于1分钟

2024-08-18

概述 badge

使用 <Badge> 组件来显示 行内信息,如状态或标签。

将你想显示的内容传递给 <Badge> 组件的 text 属性。

Props

名称类型默认值说明
type'info' | 'tip' | 'warning' | 'danger''tip'类型
textstring''文本

示例

输入:

- VuePress - <Badge type="info" text="v2" />
- VuePress - <Badge type="tip" text="v2" />
- VuePress - <Badge type="warning" text="v2" />
- VuePress - <Badge type="danger" text="v2" />

输出:

  • VuePress - v2
  • VuePress - v2
  • VuePress - v2
  • VuePress - v2