Vue定时器 ⬇️ DDDD : function ( ) { this . haha = false setTimeout ( function ( ) { this . haha = true } , 5000 ) ; # 意思就是五秒后 this . haha 从 false 从新赋值为 true } setTimeout(function(){},5000); 这就是相当与一个定时的方法 你可以设置时间完了之后在次调用自己 (自己去试,因为我也没有试) 😄😄😄😄 怎么说这个定时刷新呢,我们可以这样的来 现在methods这个里面定义一个函数 比如叫他 DDDD 在勾子 created(){} 或 mounted(){} 里面调用这个函数你看我写的 ⬇️ < script > export default { data ( ) { return { } } , created ( ) { this . DDDD ( ) //每次页面加载的时候调用我这个函数 用这个勾子也可以 mounted } , methods : { // 这就是我的DDDD DDDD ( ) { setTimeout ( function ( ) { this . $router . go ( 0 ) //刷新页面 } , 60000 ) ; //这就是 一分钟 } , } } < / script >