在vue中使用setTimeout與setInterval
在vue中啟用、清除timeout的寫法不同,如果clearInterval沒有加上window,就不會停止。
setTimeout可以直接使用:
this.timeout = setTimeout(() => {
console.log('一小時後要做的事');
}, 1000 * 60 * 60);
These were the top 10 stories published by 再不寫就要忘了 in 2019. You can also dive into monthly archives for 2019 by using the calendar at the top of this page.