You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
327 B
19 lines
327 B
9 years ago
|
# 格式化 `Tooltip` 内容
|
||
|
|
||
|
- order: 5
|
||
|
|
||
|
使用 `tipFormatter` 可以格式化 `Tooltip` 的内容。
|
||
|
|
||
|
---
|
||
|
|
||
|
````jsx
|
||
|
import { Slider } from 'antd';
|
||
|
|
||
|
function formatter(value) {
|
||
|
return '$' + value;
|
||
|
}
|
||
|
|
||
|
ReactDOM.render(<Slider tipFormatter={formatter} />
|
||
|
, document.getElementById('components-slider-demo-tip-formatter'));
|
||
|
````
|