refactor(projects): 消息提示增加等级区分

This commit is contained in:
2026-06-13 14:59:31 +08:00
parent 80f028bcb9
commit 609a01dc8a
13 changed files with 167 additions and 34 deletions

View File

@@ -18,3 +18,10 @@ export function formatRelativeTime(value: string | number) {
return time.format('YYYY-MM-DD HH:mm');
}
/** 绝对时间展示YYYY-MM-DD HH:mm空值或非法值回空串 */
export function formatDateTime(value: string | number | null | undefined) {
if (value === null || value === undefined || value === '') return '';
const time = dayjs(value);
return time.isValid() ? time.format('YYYY-MM-DD HH:mm') : '';
}