You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
918 B
32 lines
918 B
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 徽标数
|
||
9 years ago
|
type: Views
|
||
9 years ago
|
english: Badge
|
||
|
---
|
||
9 years ago
|
|
||
9 years ago
|
图标右上角的圆形徽标数字。
|
||
9 years ago
|
|
||
|
## 何时使用
|
||
|
|
||
9 years ago
|
一般出现在通知图标或头像的右上角,用于显示需要处理的消息条数,通过醒目视觉形式吸引用户处理。
|
||
9 years ago
|
|
||
|
## API
|
||
|
|
||
9 years ago
|
```jsx
|
||
9 years ago
|
<Badge count={5}>
|
||
9 years ago
|
<a href="#" className="head-example"></a>
|
||
|
</Badge>
|
||
|
```
|
||
|
|
||
9 years ago
|
|
||
|
```jsx
|
||
|
<Badge count={5} />
|
||
|
```
|
||
|
|
||
9 years ago
|
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||
|
|----------------|----------------------------------|------------|---------|--------|
|
||
9 years ago
|
| count | 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏 | Number | | |
|
||
|
| overflowCount | 展示封顶的数字值 | Number | | 99 |
|
||
9 years ago
|
| dot | 不展示数字,只有一个小红点 | boolean | | false |
|