mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 12:28:33 +08:00
19 lines
327 B
Markdown
19 lines
327 B
Markdown
|
# 格式化 `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'));
|
||
|
````
|