element Messaage componeent: Can I remove mouseenter event ?

2skhul33  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(93)

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)

5lwkijsr

5lwkijsr1#

setTimeout(function () {
messageInstance.close()
}, 2000)

// it worked , close message after 2000ms .

2ul0zpep

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.

相关问题