data: {
return {
timer: null
}
},
created() {
this.timer = setInterval(....);
},
beforeDestroy() {
if(this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
clearInterval(this.timer); //关闭
}
}

最新文章

  1. 高德地图API 简单使用
  2. nodemailer 发邮件
  3. asp.net form身份认证不定时认证失败的问题 排查
  4. html中隐藏域hidden的作用介绍及使用示例
  5. The ShortCuts in the ADT (to be continued)
  6. Resource Manager
  7. POJ 1160 Post Office
  8. OpenCV基础篇之画图及RNG随机数对象
  9. js原型链部分详细使用说明案例
  10. Android 创建虚拟机时“提示no system images installed for this target”
  11. Linux基础五
  12. Python中模块之re的功能介绍
  13. 学习tornado:异步
  14. 深度学习python的配置(Windows)
  15. Oracle安装配置
  16. 【树上莫队】【SP10707】 COT2 - Count on a tree II
  17. LR通用的性能分析流程
  18. Linux-数据库1
  19. 微信图片反防盗链 用js不太成熟的解决方式 仅供参考
  20. How to simplify a PHP code with the help of the façade pattern?

热门文章

  1. 【POJ - 2664】Prerequisites? (排序+查找)
  2. Nginx系列篇二:linux搭建Nginx负载均衡
  3. C++构造函数详解(复制构造函数 也是 拷贝构造函数)
  4. swiper.js插件的使用
  5. 数位dp知识点整理
  6. C#中的委托(转)
  7. Spring-bean(零)
  8. 教你如何配置WampServer
  9. 激活eclipse自动提示功能
  10. KendoUI Grid Pager部分 Nan-Nan of x Items