feat: 重构页面、路由与业务组件,新增课程演示

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.8 committed 2026-08-18 13:39:48 +08:00
1 parent d3ae0a8ca7
commit 7b326ee025
29 files changed
+2005 -57

No files matched your search

@@ -1,20 +1,13 @@
import { Link, useLocation } from "react-router-dom";
import { cn } from "@/utils";
import { cn } from "@/lib/cn";
import styles from "./Navigation.module.css";
interface NavItem {
label: string;
path: string;
}
interface NavigationProps {
items?: NavItem[];
className?: string;
}
import type { NavItem, NavigationProps } from "./Navigation.types";
const defaultItems: NavItem[] = [
{ label: "首页", path: "/" },
{ label: "关于", path: "/about" },
{ label: "组件示例", path: "/components" },
{ label: "课程示例", path: "/course-demo" },
];
export function Navigation({
@@ -0,0 +1,9 @@
export interface NavItem {
label: string;
path: string;
}
export interface NavigationProps {
items?: NavItem[];
className?: string;
}
@@ -1 +1,2 @@
export { Navigation } from "./Navigation.tsx";
export type { NavItem, NavigationProps } from "./Navigation.types";
+1
View File
@@ -1 +1,2 @@
export type { NavItem, NavigationProps } from "./Navigation";
export { Navigation } from "./Navigation";