vue项目涉及到的setInterval

 1  data () {
 2         return {
 3             intervalId: 0
 4         }
 5     },
 6     created () {         this.intervalId = setInterval(function(){10         }, 5000)
11     },
12     beforeDestroy () {
13         clearInterval(this.intervalId)
14     }

 

posted @ 2019-06-26 13:44  疏影横斜水清浅  阅读(243)  评论(0编辑  收藏  举报