mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
31 lines
514 B
Markdown
31 lines
514 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';
|
|
|
|
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>
|
|
</>
|
|
);
|
|
```
|