let that = this;
this.timer = setInterval(() => {
that.monitorTime = new Date(new Date().getTime() + 8*3600*1000).toJSON().substr(0, 19).replace('T', ' ')
}, 1000)
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer);
}
}
timer:null
时间随秒自动跳动
最新推荐文章于 2024-07-17 17:57:11 发布