filters: {
//时间戳日期格式转换
dateFilter(val) {
let date = new Date(val)
let Y = date.getFullYear() + ‘.’
let M =
(date.getMonth() + 1 < 10
? ‘0’ + (date.getMonth() + 1)
: date.getMonth() + 1) + ‘.’
let D = date.getDate() < 10 ? ‘0’ + date.getDate() : date.getDate()
return Y + M + D
}
}
时间戳日期格式转换
最新推荐文章于 2024-06-27 19:52:56 发布