Fixes bug add baseModal | baseForm 组件

This commit is contained in:
Ah jung
2021-08-05 17:24:24 +08:00
parent 98e1bf0227
commit 8a5f237630
59 changed files with 2056 additions and 106 deletions

12
src/utils/dateUtil.ts Normal file
View File

@@ -0,0 +1,12 @@
import { format } from 'date-fns';
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm';
const DATE_FORMAT = 'YYYY-MM-DD ';
export function formatToDateTime(date: null, formatStr = DATE_TIME_FORMAT): string {
return format(date, formatStr);
}
export function formatToDate(date: null, formatStr = DATE_FORMAT): string {
return format(date, formatStr);
}