const timer = setInterval(() =>{
// 某些定时器操作
}, 5000);
// 通过$once来监听定时器
// 在beforeDestroy钩子触发时清除定时器
this.$once('hook:beforeDestroy', () => {
clearInterval(timer);
})