生产管理系统前端 1.修复了左侧菜单激活样式 2.修复了主题,连带解决h1-h6样式问题

This commit is contained in:
2025-10-23 16:32:50 +08:00
parent 4f3beb2568
commit d254790901
3 changed files with 9 additions and 24 deletions

View File

@@ -22,17 +22,6 @@ interface SideBarData {
navMain: NavItem[];
}
// 内部菜单项结构用于LeftSidebar组件
interface MenuItem {
id: string;
label: string;
icon?: React.ReactNode;
children?: {
id: string;
label: string;
path?: string;
}[];
}
interface SideBarOldProps {
children: React.ReactNode;

View File

@@ -53,18 +53,6 @@ export function LeftSidebar({
setExpandedMenus(new Set());
}, [isCollapsed]);
const toggleMenu = (menuId: string) => {
setExpandedMenus(prev => {
const newSet = new Set(prev);
if (newSet.has(menuId)) {
newSet.delete(menuId);
} else {
newSet.add(menuId);
}
return newSet;
});
};
return (
<div
className={cn(
@@ -170,7 +158,9 @@ export function LeftSidebar({
variant={activePath === child.path ? "secondary" : "ghost"}
className={cn(
"w-full justify-start text-xs font-normal h-8",
activePath === child.path && "bg-muted text-muted-foreground font-medium border-l-2 border-primary"
activePath === child.path
? "bg-green-50 text-green-700 font-medium hover:bg-green-50"
: "hover:bg-gray-100 hover:text-gray-900"
)}
onClick={() => child.path && onNavigate(child.path)}
>

View File

@@ -318,5 +318,11 @@
body {
@apply bg-background text-foreground;
}
h2 {
font-size: var(--text-xl);
font-weight: var(--font-weight-medium);
line-height: 1.5;
}
}
@import "./body.css";