2020-05-22 00:20:01 +08:00
|
|
|
---
|
|
|
|
order: 4
|
2020-05-22 13:06:52 +08:00
|
|
|
debug: true
|
2020-05-22 00:20:01 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 隐藏后销毁
|
|
|
|
en-US: Destroy tooltip when hidden
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
通过 `destroyTooltipOnHide` 控制提示关闭时是否销毁 dom 节点。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Setting `destroyTooltipOnHide` to control whether destroy dom node of tooltip when hidden.
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
import { Tooltip } from 'antd';
|
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => (
|
2020-05-22 00:20:01 +08:00
|
|
|
<Tooltip destroyTooltipOnHide={{ keepParent: false }} title="prompt text">
|
|
|
|
<span>Tooltip will destroy when hidden.</span>
|
2022-04-03 23:27:45 +08:00
|
|
|
</Tooltip>
|
2020-05-22 00:20:01 +08:00
|
|
|
);
|
|
|
|
```
|