2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 3
|
2016-07-11 11:45:42 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 讨嫌的小红点
|
|
|
|
en-US: Red badge
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-09-01 13:59:07 +08:00
|
|
|
|
2016-07-11 11:45:42 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-09-01 13:59:07 +08:00
|
|
|
没有具体的数字。
|
|
|
|
|
2016-07-11 11:45:42 +08:00
|
|
|
## en-US
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
This will simply display a red badge, without a specific count. If count equals 0, it won't display the dot.
|
2016-07-11 11:45:42 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2019-08-13 14:07:17 +08:00
|
|
|
import { Badge } from 'antd';
|
2019-11-28 12:34:33 +08:00
|
|
|
import { NotificationOutlined } from '@ant-design/icons';
|
2015-09-01 13:59:07 +08:00
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => (
|
2021-08-02 12:22:30 +08:00
|
|
|
<>
|
2017-02-19 20:27:06 +08:00
|
|
|
<Badge dot>
|
2021-08-02 12:22:30 +08:00
|
|
|
<NotificationOutlined style={{ fontSize: 16 }} />
|
2018-02-24 11:40:44 +08:00
|
|
|
</Badge>
|
2017-02-19 20:27:06 +08:00
|
|
|
<Badge dot>
|
|
|
|
<a href="#">Link something</a>
|
|
|
|
</Badge>
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|