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

34 lines
569 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`.
```tsx
2022-05-21 22:14:15 +08:00
import { Avatar, Badge } from 'antd';
import React from 'react';
const App: React.FC = () => (
<>
<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
);
export default App;
2019-05-07 14:57:32 +08:00
```