mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-13 11:34:02 +08:00
Popover: fix: delayed popover appears after mouse left
This commit is contained in:
@@ -109,16 +109,17 @@ export default {
|
||||
this.showPopper = false;
|
||||
},
|
||||
handleMouseEnter() {
|
||||
clearTimeout(this._timer);
|
||||
if (this.openDelay) {
|
||||
setTimeout(() => {
|
||||
this._timer = setTimeout(() => {
|
||||
this.showPopper = true;
|
||||
}, this.openDelay);
|
||||
} else {
|
||||
this.showPopper = true;
|
||||
}
|
||||
clearTimeout(this._timer);
|
||||
},
|
||||
handleMouseLeave() {
|
||||
clearTimeout(this._timer);
|
||||
this._timer = setTimeout(() => {
|
||||
this.showPopper = false;
|
||||
}, 200);
|
||||
|
||||
Reference in New Issue
Block a user