mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
06dff86287
* fix: Badge count style when customize color close #31590 close #31591 * add demo for debug * update badge demos * create ribbon.test.tsx
32 lines
522 B
Markdown
32 lines
522 B
Markdown
---
|
|
order: 100
|
|
title:
|
|
zh-CN: 自定义标题
|
|
en-US: Title
|
|
debug: true
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
设置鼠标放在状态点上时显示的文字。
|
|
|
|
## en-US
|
|
|
|
The badge will display `title` when hovered over, instead of `count`.
|
|
|
|
```jsx
|
|
import { Badge, Avatar } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<>
|
|
<Badge count={5} title="Custom hover text">
|
|
<Avatar shape="square" size="large" />
|
|
</Badge>
|
|
<Badge count={-5} title="Negative">
|
|
<Avatar shape="square" size="large" />
|
|
</Badge>
|
|
</>,
|
|
mountNode,
|
|
);
|
|
```
|