2018-04-10 01:09:18 +08:00
|
|
|
---
|
2019-04-01 10:15:15 +08:00
|
|
|
order: 100
|
2018-04-10 01:09:18 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 自定义标题
|
|
|
|
en-US: Title
|
2019-04-01 10:15:15 +08:00
|
|
|
debug: true
|
2018-04-10 01:09:18 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2019-04-01 10:15:15 +08:00
|
|
|
设置鼠标放在状态点上时显示的文字。
|
2018-04-10 01:09:18 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
The badge will display `title` when hovered over, instead of `count`.
|
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2021-08-02 12:22:30 +08:00
|
|
|
import { Badge, Avatar } from 'antd';
|
2018-04-10 01:09:18 +08:00
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => (
|
2021-08-02 12:22:30 +08:00
|
|
|
<>
|
2018-04-10 01:09:18 +08:00
|
|
|
<Badge count={5} title="Custom hover text">
|
2021-08-02 12:22:30 +08:00
|
|
|
<Avatar shape="square" size="large" />
|
2018-04-10 01:09:18 +08:00
|
|
|
</Badge>
|
2021-01-29 14:27:36 +08:00
|
|
|
<Badge count={-5} title="Negative">
|
2021-08-02 12:22:30 +08:00
|
|
|
<Avatar shape="square" size="large" />
|
2021-01-29 14:27:36 +08:00
|
|
|
</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
|
|
|
```
|