filters: {
formatDate: function (date) {
var d = new Date(date);
var year = d.getFullYear();
var getMonth = d.getMonth() + 1;
var month = getMonth < 10 ? '0' + getMonth : '' + getMonth;
var day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate();
var hour = d.getHours();
var minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes();
var seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : '' + d.getSeconds();
return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds;
},
},
使用:
{{ time | formatDate }}
6993

被折叠的 条评论
为什么被折叠?



