In my project, mouseEnter needn't reset clock, but I remove it by it's instence,it not work; code id behind, how can i do it?
// 避免鼠标悬浮造成不关闭
setTimeout(function () {
// the dom get is success
let dom = messageInstance.$el;
dom.removeEventListener('mouseenter', messageInstance.clearTimer);
dom.removeEventListener('mouseleave', messageInstance.startTimer);
}, 10)
2条答案
按热度按时间5lwkijsr1#
setTimeout(function () {
messageInstance.close()
}, 2000)
// it worked , close message after 2000ms .
2ul0zpep2#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.