Commit 3b0d5060 authored by linxin's avatar linxin

fix:日期格式

parent 42d6e778
...@@ -101,11 +101,13 @@ export default { ...@@ -101,11 +101,13 @@ export default {
} }
}, },
'timeFormat': function (time) { 'timeFormat': function (time) {
var date = new Date(time) if (time !== '') {
var y = date.getFullYear() var date = new Date(time)
var m = date.getMonth() + 1 var y = date.getFullYear()
var d = date.getDate() var m = date.getMonth() + 1
return `${y}-${m}-${d}` var d = date.getDate()
return `${y}-${m}-${d}`
}
}, },
}, },
data () { data () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment