From 24bee1a669c3f01f4c3ce7c6f4f4e2e37fe3dfe2 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期六, 10 一月 2026 08:34:40 +0800
Subject: [PATCH] #application-dev

---
 rsf-admin/src/layout/index.jsx |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/rsf-admin/src/layout/index.jsx b/rsf-admin/src/layout/index.jsx
index 40f6657..95e8f93 100644
--- a/rsf-admin/src/layout/index.jsx
+++ b/rsf-admin/src/layout/index.jsx
@@ -1,13 +1,54 @@
-import { Layout as RALayout, CheckForApplicationUpdate } from "react-admin";
+import { Layout as RALayout, CheckForApplicationUpdate, useSidebarState } from "react-admin";
 import AppBar from './AppBar';
-import { MyMenu } from './MyMenu'
+import { MyMenu } from './MyMenu';
+import TabsBar from './TabsBar';
+import { Box } from '@mui/material';
+
+const LayoutContent = ({ children }) => {
+  const [sidebarIsOpen] = useSidebarState();
+  const sidebarWidth = sidebarIsOpen ? 200 : 50;
+
+  return (
+    <RALayout
+      appBar={AppBar}
+      menu={MyMenu}
+      sx={{
+        '& .RaLayout-content': {
+          position: 'absolute',
+          left: `${sidebarWidth}px`,
+          overflowY: 'auto',
+          width: `calc(100% - ${sidebarWidth}px)`,
+          height: 'calc(100% - 86px)', // 鍑忓幓TabsBar鐨勯珮搴� (50px AppBar + 36px TabsBar)
+          top: '86px',
+          transition: (theme) =>
+            theme.transitions.create(['left', 'width'], {
+              easing: theme.transitions.easing.sharp,
+              duration: theme.transitions.duration.leavingScreen,
+            }),
+        }
+      }}
+    >
+      <Box sx={{
+        position: 'fixed',
+        top: 48,
+        // left: 0,
+        left: sidebarWidth + 5,
+        right: 0,
+        zIndex: 1100,
+        transition: (theme) =>
+          theme.transitions.create('left', {
+            easing: theme.transitions.easing.sharp,
+            duration: theme.transitions.duration.leavingScreen,
+          }),
+      }}>
+        <TabsBar />
+      </Box>
+      {children}
+      <CheckForApplicationUpdate />
+    </RALayout>
+  );
+};
 
 export const Layout = ({ children }) => (
-  <RALayout
-    appBar={AppBar}
-    menu={MyMenu}
-  >
-    {children}
-    <CheckForApplicationUpdate />
-  </RALayout>
+  <LayoutContent>{children}</LayoutContent>
 );

--
Gitblit v1.9.1