会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
谢礼森
一个程序员的自我修炼
管理
2018年8月21日
vue 单独页面定时器 离开页面销毁定时器
摘要: ``` data: { return { timer: null } }, created() { this.timer = setInterval(....); }, beforeDestroy() { if(this.timer) { //如果定时器还在运行 或者直接关闭,不用判断 clearInterval(this.timer...
阅读全文
posted @ 2018-08-21 08:18 geek程序员
阅读(9853)
评论(0)
推荐(1)
编辑