refactor(projects): 消息提示增加等级区分
This commit is contained in:
@@ -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') : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user