SOURCE

console 命令行工具 X clear

                    
>
console
var app = new Vue({
    el: '#app',
    data: {
      message: 'Hello Vue!',
      testList: []
    },
    methods: {
        getData () {
            let that = this
            //   然后这里写请求res
            that.testList = res.content
            //   拿到数据就赋值上去,可能要用set或者强制渲染
            this.timer = setTimeout(() => {
                that.getData()
            }, 10000)   
        },
        clearTime () {
            clearTimeout(this.timer)
        }
    },
    beforeDestroy () {
        this.clearTime()
    }
})
<div id="app">
  {{ message }}
</div>

本项目引用的自定义外部资源