时间处理
This commit is contained in:
parent
0026faedfe
commit
afabcfbf3b
@ -99,7 +99,11 @@ export default {
|
||||
return `${this.datetime.getFullYear()}年${this.datetime.getMonth() + 1}月${this.datetime.getDate()}日`
|
||||
},
|
||||
time() {
|
||||
return `${this.datetime.getHours()}:${this.datetime.getMinutes() + 1}`
|
||||
let h = this.datetime.getHours().toString(),
|
||||
m = this.datetime.getMinutes().toString()
|
||||
if (h.length === 1) h = '0' + h
|
||||
if (m.length === 1) m = '0' + m
|
||||
return `${h}:${m}`
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user