2018-11-01 11:40:47 +08:00
|
|
|
|
---
|
|
|
|
|
order: 7
|
|
|
|
|
title:
|
|
|
|
|
zh-CN: 控制 ToolTip 的显示
|
|
|
|
|
en-US: Control visible of ToolTip
|
|
|
|
|
---
|
|
|
|
|
|
2018-12-20 20:39:18 +08:00
|
|
|
|
## zh-CN
|
2018-11-01 11:40:47 +08:00
|
|
|
|
|
2022-08-17 15:47:22 +08:00
|
|
|
|
当 `tooltip.open` 为 `true` 时,将始终显示 ToolTip;反之则始终不显示,即使在拖动、移入时也是如此。
|
2018-11-01 11:40:47 +08:00
|
|
|
|
|
2018-12-20 20:39:18 +08:00
|
|
|
|
## en-US
|
2018-11-01 11:40:47 +08:00
|
|
|
|
|
2022-08-17 15:47:22 +08:00
|
|
|
|
When `tooltip.open` is `true`, ToolTip will always show, or ToolTip will not show anyway, even if dragging or hovering.
|
2018-11-01 11:40:47 +08:00
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
|
```tsx
|
2018-12-11 15:18:30 +08:00
|
|
|
|
import { Slider } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
|
import React from 'react';
|
2018-11-01 11:40:47 +08:00
|
|
|
|
|
2022-08-17 15:47:22 +08:00
|
|
|
|
const App: React.FC = () => <Slider defaultValue={30} tooltip={{ open: true }} />;
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
|
```
|