src/utils/ruoyi.js
@@ -4,11 +4,13 @@ */ // 日期格式化 // 说明:默认格式已按客户口径改为「只显示年月日」;确实要带时分秒请显式传 pattern, // 例如 parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}') export function parseTime(time, pattern) { if (arguments.length === 0 || !time) { return null } const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' const format = pattern || '{y}-{m}-{d}' let date if (typeof time === 'object') { date = time