init
This commit is contained in:
14
web/apps/web-antd/src/utils/date.ts
Normal file
14
web/apps/web-antd/src/utils/date.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
/**
|
||||
* 格式化 ISO 时间字符串为 'YYYY-MM-DD HH:mm:ss'
|
||||
* @param value ISO 时间字符串
|
||||
* @param format 自定义格式,默认 'YYYY-MM-DD HH:mm:ss'
|
||||
*/
|
||||
export function format_datetime(
|
||||
value: Date | string,
|
||||
format = 'YYYY-MM-DD HH:mm:ss',
|
||||
): string {
|
||||
if (!value) return '';
|
||||
return dayjs(value).format(format);
|
||||
}
|
||||
5
web/apps/web-antd/src/utils/dict.ts
Normal file
5
web/apps/web-antd/src/utils/dict.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum DICT_TYPE {
|
||||
USER_TYPE = 'user_type',
|
||||
|
||||
// TEMU_ORDER_STATUS = 'temu_order_status',
|
||||
}
|
||||
Reference in New Issue
Block a user