data(){
return {
nuw:0,
}
},
methods: {
click(){
//定义定时器开始时间为0
var progressnuw =0;
//顶一个定时器
var timer=setInterval(()=>{
//变量一直++
progressnuw++
//清楚定时器
if(progressnuw>=100){
clearInterval(timer);
}
//获取重新赋值
this.nuw=progressnuw
},30)
}
},