2016-03-31 14:17:09 +08:00
|
|
|
---
|
|
|
|
category: Components
|
2016-09-21 11:28:38 +08:00
|
|
|
subtitle: 标签
|
2018-11-04 16:20:35 +08:00
|
|
|
type: 数据展示
|
2016-09-21 11:28:38 +08:00
|
|
|
title: Tag
|
2016-03-31 14:17:09 +08:00
|
|
|
---
|
2015-07-22 11:06:55 +08:00
|
|
|
|
2015-07-28 20:15:25 +08:00
|
|
|
进行标记和分类的小标签。
|
|
|
|
|
|
|
|
## 何时使用
|
|
|
|
|
|
|
|
- 用于标记事物的属性和维度。
|
|
|
|
- 进行分类。
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
2016-11-10 11:14:03 +08:00
|
|
|
### Tag
|
|
|
|
|
2017-10-25 10:25:44 +08:00
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| afterClose | 关闭动画完成后的回调 | () => void | - |
|
|
|
|
| closable | 标签是否可以关闭 | boolean | false |
|
|
|
|
| color | 标签色 | string | - |
|
|
|
|
| onClose | 关闭时的回调 | (e) => void | - |
|
2018-06-12 22:23:04 +08:00
|
|
|
| visible | 是否显示标签 | boolean | `true` |
|
2016-11-10 11:14:03 +08:00
|
|
|
|
|
|
|
### Tag.CheckableTag
|
|
|
|
|
2017-10-25 10:25:44 +08:00
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| checked | 设置标签的选中状态 | boolean | false |
|
|
|
|
| onChange | 点击标签时触发的回调 | (checked) => void | - |
|