标签:div eth att UNC script filters gets 直接 ret
filters: { formatTime: function(value) { let time = new Date(value * 1000); let year = time.getFullYear(); let month = time.getMonth() + 1; if (month < 10) { month = "0" + month; } let day = time.getDate() < 10 ? "0" + time.getDate() : time.getDate(); let hour = time.getHours() < 10 ? "0" + time.getHours() : time.getHours(); let minute = time.getMinutes() < 10 ? "0" + time.getMinutes() : time.getMinutes(); let second = time.getSeconds() < 10 ? "0" + time.getSeconds() : time.getSeconds(); return `${year}-${month}-${day} ${hour}:${minute}:${second}`; } },
直接使用{{**|formatTime}}
标签:div eth att UNC script filters gets 直接 ret
原文地址:https://www.cnblogs.com/Glant/p/11287885.html