新增案例库列表和详情页

This commit is contained in:
czj
2026-07-08 13:59:26 +08:00
parent 1f382c280c
commit c9ca93faa0
13 changed files with 1323 additions and 10 deletions
+18
View File
@@ -0,0 +1,18 @@
import type { OptimizationResultVersion } from "../../lib/cases/types";
export function formatDate(value: string) {
return new Date(value).toLocaleString("zh-CN", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
});
}
export function versionLabel(version: OptimizationResultVersion) {
return `v${version.version} · ${
version.status === "optimized" ? "已优化" : "失败"
}`;
}