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 }