<div class="shadow-time">
<div>{{ time[0] }}</div>
<div>{{ time[1] }}</div>
<div>:</div>
<div>{{ time[3] }}</div>
<div>{{ time[4] }}</div>
</div>
time: '00:00',
created() {
this.interval = setInterval(this.getDateTime, 1000)
}
getDateTime() {
const date = new Date()
this.year = date.getFullYear()
this.month = date.getMonth() + 1
this.date = date.getDate()
this.time = date.toTimeString().substring(0, 5)
},
网友评论