data(){
return{
timer:null,
minute: "00",
second: "00",
millisecond: "00",
}
}
timerHandle() {
let m_s = 0,
s = 0,
m = 0;
this.countTimer = setInterval(() => {
if (m_s >= 60) { //这里的60相当于1000毫秒
m_s = 0;
s++;
}
if (s >= 20) {
s = 0;
m++
}
m_s = m_s + 3;
this.millisecond = m_s > 9 ? m_s : '0' + m_s;
this.second = s > 9 ? s : '0' + s;
this.minute = m > 9 ? m : '0' + m;
}, 50)
}
留言:上线了极简导航网站,想让它更好玩好用一些,望各位大佬给提提意见
地址:www.cuczz.com