Skip to content

Commit d970f47

Browse files
zhuzhuaicodingtangjinzhou
authored andcommitted
Fix tooltip destroy tooltip on hide (#727)
* fix: add destroyTooltipOnHide prop * doc: destroyTooltipOnHide
1 parent e5020f7 commit d970f47

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

components/tooltip/abstractTooltipProps.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export default () => ({
2828
getPopupContainer: PropTypes.func,
2929
arrowPointAtCenter: PropTypes.bool.def(false),
3030
autoAdjustOverflow: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]).def(true),
31+
destroyTooltipOnHide: PropTypes.bool.def(false),
3132
align: PropTypes.object.def({}),
3233
});

components/tooltip/index.en-US.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
2121
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` |
2222
| trigger | Tooltip trigger mode | `hover` \| `focus` \| `click` \| `contextmenu` | `hover` |
2323
| visible(v-model) | Whether the floating tooltip card is visible or not | boolean | `false` |
24+
| destroyTooltipOnHide | Whether to destroy tooltip on hide | boolean | false |
2425
| align | this value will be merged into placement's config, please refer to the settings [dom-align](https://github.com/yiminghe/dom-align) | Object | - |
2526

2627
### events

components/tooltip/index.zh-CN.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | top |
2222
| trigger | 触发行为,可选 `hover/focus/click/contextmenu` | string | hover |
2323
| visible(v-model) | 用于手动控制浮层显隐 | boolean | false |
24+
| destroyTooltipOnHide | 隐藏后是否销毁tooltip | boolean | false |
2425
| align | 该值将合并到 placement 的配置中,设置参考 [dom-align](https://github.com/yiminghe/dom-align) | Object ||
2526

2627
### 事件

0 commit comments

Comments
 (0)