当我从vue数据中获取数据变量时,未定义变量如何在vue方法中实时交换变量
export default {
name: 'Chart',
components: {
},
data(){
return {
firstUpdateTime:0,
price:[],
timeLable:[],
maxPrice: 20000,
}
},
methods:{
calculateChart : function(){
var a = 300;
setInterval(() =>
this.firstUpdateTime ++;
a--;
);}, 30000);
}
},
}