导航菜单
{isMobile ? (
-
+
) : (
+ /* 根据侧边栏状态显示不同按钮 */
)}
diff --git a/crop-x/src/components/layouts/SideBar/components/MainContent.tsx b/crop-x/src/components/layouts/SideBar/components/MainContent.tsx
index e32657c..a4efaf6 100644
--- a/crop-x/src/components/layouts/SideBar/components/MainContent.tsx
+++ b/crop-x/src/components/layouts/SideBar/components/MainContent.tsx
@@ -1,28 +1,21 @@
'use client';
import { useState } from 'react';
-import { Menu, X, ChevronRight, Home, FileText, Settings } from 'lucide-react';
+import { ChevronLeft, ChevronRight, X } from 'lucide-react';
import { cn } from '@/lib/utils';
interface MainContentProps {
- title?: string;
children: React.ReactNode;
isMobile?: boolean;
sidebarOpen?: boolean;
onToggleSidebar?: () => void;
- breadcrumb?: {
- label: string;
- path?: string;
- }[];
}
export function MainContent({
- title = "当前页面",
children,
isMobile = false,
sidebarOpen = false,
onToggleSidebar,
- breadcrumb = []
}: MainContentProps) {
const [showMobileSidebar, setShowMobileSidebar] = useState(false);
@@ -44,65 +37,11 @@ export function MainContent({
/>
)}
- {/* 主内容区域 */}
-
- {/* 顶部导航栏 */}
-
-
-
- {/* 菜单按钮 */}
-
-
- {/* 面包屑导航 */}
-
-
- {breadcrumb.length > 0 ? (
- breadcrumb.map((item, index) => (
-
- ))
- ) : (
-
{title}
- )}
-
-
-
-
-
-
- {/* 主内容区域 */}
-
-
- {/* 页面内容 */}
- {children}
-
-
+ {/* 主内容区域 - 去掉顶部白色横条 */}
+
>
);
diff --git a/crop-x/src/styles/body.css b/crop-x/src/styles/body.css
index 8e15888..2efc7c5 100644
--- a/crop-x/src/styles/body.css
+++ b/crop-x/src/styles/body.css
@@ -6,5 +6,16 @@
.bodySon2{
flex: 1;
- overflow: auto;
+ min-height: 0;
+ /* 移除整体滚动,让子元素独立滚动 */
+}
+
+.sidebarScroll{
+ height: 100%;
+ overflow-y: auto;
+}
+
+.contentScroll{
+ height: 100%;
+ overflow-y: auto;
}
\ No newline at end of file