Popover: fix: delayed popover appears after mouse left

pull/6115/merge
laobubu 2017-07-25 17:09:46 +08:00 committed by 杨奕
parent 513c90fd7e
commit c1ce7a21b9
1 changed files with 3 additions and 2 deletions

View File

@ -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);