ant-design/components/badge/demo/title.md

31 lines
514 B
Markdown
Raw Normal View History

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