From 01ea11a8e7a217b51208ae31ca7bd4c7cd13f7fa Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 08 一月 2026 12:37:49 +0800
Subject: [PATCH] #tabsBar

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

diff --git a/rsf-admin/src/layout/index.jsx b/rsf-admin/src/layout/index.jsx
index 9d105ce..293ae54 100644
--- a/rsf-admin/src/layout/index.jsx
+++ b/rsf-admin/src/layout/index.jsx
@@ -1,14 +1,53 @@
-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: sidebarWidth,
+        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}
-    sx={{ '& .RaLayout-content': { position: 'absolute', left: '200px', overflowY: 'auto', width: 'calc(100% - 200px)', height: 'calc(100% - 50px)' } }}
-  >
-    {children}
-    <CheckForApplicationUpdate />
-  </RALayout>
+  <LayoutContent>{children}</LayoutContent>
 );

--
Gitblit v1.9.1