eladmin-web-master/src/components/Crud/crud.js
@@ -560,6 +560,20 @@ } }, /** * 月日格式化 * @param {Object} timestamp 时间戳 */ toMonthDay(timestamp) { if (timestamp == null) { return } else { const system = new Date(timestamp) const month = system.getMonth() + 1 < 10 ? '0' + (system.getMonth() + 1) : system.getMonth() + 1 const date = system.getDate() < 10 ? '0' + system.getDate() : system.getDate() return month + '-' + date } }, /** * 时间格式化 * @param {Object} timestamp */