mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 21:48:19 +08:00
aa97494625
* feat: change slide tooltip api * fix: deprecated warning * refactor: remove boolean type support for Slider tooltip * feat: update warning text * chore: fix typo * chore: save prod perf * test: back of test case * chore: clean up * chore: fix test require Co-authored-by: 二货机器人 <smith3816@gmail.com>
590 B
590 B
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
使用 tooltip.formatter
可以格式化 Tooltip
的内容,设置 tooltip.formatter={null}
,则隐藏 Tooltip
。
en-US
Use tooltip.formatter
to format content of Tooltip
. If tooltip.formatter
is null, hide it.
import { Slider } from 'antd';
import React from 'react';
const formatter = (value: number) => `${value}%`;
const App: React.FC = () => (
<>
<Slider tooltip={{ formatter }} />
<Slider tooltip={{ formatter: null }} />
</>
);
export default App;