countdown(){
if(this.maxTime>0){
this.maxTime--
this.minutes=Math.floor(this.maxTime / 60).toString().padStart(2,'0')
this.seconds=Math.floor(this.maxTime % 60).toString().padStart(2,'0')
}else{
clearInterval(this.timers);
}
},
startCountdown(){
this.maxTime=this.timeValue*60;
this.timers=setInterval(()=>{
this.countdown()
},1000)
},
closeTime(){
this.timeValue=0
this.minutes="00";
this.seconds="00";
this.maxTime=''
clearInterval(this.timers);
},
stopTime(){
if(this.stopText==="暂停"){
clearInterval(this.timers);
}else if(this.stopText==="开始"){
this.timers=setInterval(()=>{
this.countdown()
},1000)
}
this.stopText=this.stopText==="开始"?"暂停":"开始"
},