refactor: 重新调整exam页面

This commit is contained in:
2025-08-11 17:01:24 +08:00
parent b09961473e
commit 6e84953740
6 changed files with 1469 additions and 1070 deletions

View File

@@ -48,3 +48,14 @@ export function useOptionalInjection<T>(
const value = useFn();
return value ?? defaultValue;
}
export function formatDate(date: Date | string) {
const dateObj = typeof date === "string" ? new Date(date) : date;
return dateObj.toLocaleString("zh-CN", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
});
}