vue中clearInterva清除失效解决方法

2019/06/26 11:44
阅读数 5.9K
const chatTimer = setInterval(() => { console.log(chatTimer); this.chatMsg(); }, 1000);

this.$once('hook:beforeDestroy', () => { clearInterval(chatTimer); })

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部