feat: 初始提交

This commit is contained in:
siujamo committed 2025-12-25 16:12:01 +08:00
commit faff32475f
77 files changed
+6123

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { useMatches } from "react-router"
import type { BreadcrumbItemType } from "antd/es/breadcrumb/Breadcrumb"
import type { RouteHandle } from "@/types/route"
export function useAntBreadcrumbs(): BreadcrumbItemType[] {
const matches = useMatches()
return matches
.filter((match) => (match.handle as RouteHandle)?.label)
.map((match) => {
const handle = match.handle as RouteHandle
const path = match.pathname
const title = handle.label || ""
return {
title,
}
})
}