mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-29 20:08:37 +08:00
44 lines
647 B
Markdown
44 lines
647 B
Markdown
---
|
|
order: 3
|
|
title:
|
|
zh-CN: 讨嫌的小红点
|
|
en-US: Red badge
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
没有具体的数字。
|
|
|
|
## en-US
|
|
|
|
This will simply display a red badge, without a specific count.
|
|
If count equals 0, it won't display the dot.
|
|
|
|
````jsx
|
|
import { Badge, Icon } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<div>
|
|
<Badge dot>
|
|
<Icon type="notification" />
|
|
</Badge>
|
|
<Badge count={0} dot>
|
|
<Icon type="notification" />
|
|
</Badge>
|
|
<Badge dot>
|
|
<a href="#">Link something</a>
|
|
</Badge>
|
|
</div>,
|
|
mountNode
|
|
);
|
|
````
|
|
|
|
<style>
|
|
.anticon-notification {
|
|
width: 16px;
|
|
height: 16px;
|
|
line-height: 16px;
|
|
font-size: 16px;
|
|
}
|
|
</style>
|