mirror of https://github.com/ElemeFE/element
Tooltip: add hide-on-hover
parent
e7a610621f
commit
7883b16bef
|
@ -212,3 +212,4 @@ Disabled form elements are not supported in tooltip, see more information at [MD
|
|||
| open-delay | delay of appearance, in millisecond | number | — | 0 |
|
||||
| manual | whether to control Tooltip manually. `mouseenter` and `mouseleave` won't have effects if set to `true` | boolean | — | false |
|
||||
| popper-class | custom class name for Tooltip's popper | string | — | — |
|
||||
| enterable | whether the mouse can enter the tooltip | Boolean | — | true |
|
||||
|
|
|
@ -214,3 +214,4 @@ tooltip 内不支持 disabled form 元素,参考[MDN](https://developer.mozill
|
|||
| open-delay | 延迟出现,单位毫秒 | Number | — | 0 |
|
||||
| manual | 手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效 | Boolean | — | false |
|
||||
| popper-class | 为 Tooltip 的 popper 添加类名 | String | — | — |
|
||||
| enterable | 鼠标是否可进入到 tooltip 中 | Boolean | — | true |
|
||||
|
|
|
@ -35,6 +35,10 @@ export default {
|
|||
gpuAcceleration: false
|
||||
};
|
||||
}
|
||||
},
|
||||
enterable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -107,7 +111,7 @@ export default {
|
|||
},
|
||||
|
||||
handleClosePopper() {
|
||||
if (this.expectedState || this.manual) return;
|
||||
if (this.enterable && this.expectedState || this.manual) return;
|
||||
clearTimeout(this.timeout);
|
||||
this.showPopper = false;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue