2018-04-10 01:09:18 +08:00
|
|
|
---
|
|
|
|
order: 7
|
|
|
|
title:
|
|
|
|
zh-CN: 自定义标题
|
|
|
|
en-US: Title
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
设置鼠标放在状态点上时显示的文字
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
The badge will display `title` when hovered over, instead of `count`.
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Badge } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
|
|
|
<Badge count={5} title="Custom hover text">
|
|
|
|
<a href="#" className="head-example" />
|
|
|
|
</Badge>
|
2018-06-27 15:55:04 +08:00
|
|
|
</div>,
|
|
|
|
mountNode);
|
2018-04-10 01:09:18 +08:00
|
|
|
````
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.ant-badge:not(.ant-badge-status) {
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
|
|
|
.head-example {
|
|
|
|
width: 42px;
|
|
|
|
height: 42px;
|
|
|
|
border-radius: 4px;
|
|
|
|
background: #eee;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
</style>
|