徽章
148 字小于 1 分钟
2024-08-18
概述 badge
使用 <Badge> 组件来显示 行内信息,如状态或标签。
将你想显示的内容传递给 <Badge> 组件的 text 属性。
Props
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| type | 'info' | 'tip' | 'warning' | 'danger' | 'tip' | 类型 |
| text | string | '' | 文本 |
示例
输入:
- 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
