生产管理系统前端 1.修复了左侧菜单激活样式 2.修复了主题,连带解决h1-h6样式问题
This commit is contained in:
@@ -22,17 +22,6 @@ interface SideBarData {
|
|||||||
navMain: NavItem[];
|
navMain: NavItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 内部菜单项结构(用于LeftSidebar组件)
|
|
||||||
interface MenuItem {
|
|
||||||
id: string;
|
|
||||||
label: string;
|
|
||||||
icon?: React.ReactNode;
|
|
||||||
children?: {
|
|
||||||
id: string;
|
|
||||||
label: string;
|
|
||||||
path?: string;
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SideBarOldProps {
|
interface SideBarOldProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@@ -53,18 +53,6 @@ export function LeftSidebar({
|
|||||||
setExpandedMenus(new Set());
|
setExpandedMenus(new Set());
|
||||||
}, [isCollapsed]);
|
}, [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 (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -170,7 +158,9 @@ export function LeftSidebar({
|
|||||||
variant={activePath === child.path ? "secondary" : "ghost"}
|
variant={activePath === child.path ? "secondary" : "ghost"}
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-full justify-start text-xs font-normal h-8",
|
"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)}
|
onClick={() => child.path && onNavigate(child.path)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -318,5 +318,11 @@
|
|||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
|
h2 {
|
||||||
|
font-size: var(--text-xl);
|
||||||
|
font-weight: var(--font-weight-medium);
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@import "./body.css";
|
@import "./body.css";
|
||||||
Reference in New Issue
Block a user