From 790b6905ef59aa6c6e148a6d805c5f146077097f Mon Sep 17 00:00:00 2001
From: xie2can <384968446@qq.com>
Date: Fri, 15 May 2026 14:05:34 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE/=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E9=87=8D=E6=9E=84=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=E4=B8=BA=20/xxx/index.tsx?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitattributes | 1 +
src/layouts/RootLayout.tsx | 10 +++-----
src/layouts/SystemLayout.tsx | 5 ++++
src/pages/{About.tsx => about/index.tsx} | 0
src/pages/{Home.tsx => home/index.tsx} | 0
.../{NotFound.tsx => not-found/index.tsx} | 0
src/pages/system/user/index.tsx | 21 ++++++++++++++++
src/routes/index.tsx | 24 +++++++++++++++----
src/routes/utils.tsx | 18 ++++++++++++++
9 files changed, 68 insertions(+), 11 deletions(-)
create mode 100644 .gitattributes
create mode 100644 src/layouts/SystemLayout.tsx
rename src/pages/{About.tsx => about/index.tsx} (100%)
rename src/pages/{Home.tsx => home/index.tsx} (100%)
rename src/pages/{NotFound.tsx => not-found/index.tsx} (100%)
create mode 100644 src/pages/system/user/index.tsx
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6313b56
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/src/layouts/RootLayout.tsx b/src/layouts/RootLayout.tsx
index 675c642..a0c56ba 100644
--- a/src/layouts/RootLayout.tsx
+++ b/src/layouts/RootLayout.tsx
@@ -3,16 +3,11 @@ import { Layout, Menu } from 'antd';
import { useState } from 'react';
import { Outlet, useLocation, useNavigate } from 'react-router';
import { routes } from '../routes';
+import { toMenuItems } from '../routes/utils';
const { Header, Sider, Content } = Layout;
-const menuItems = routes
- .filter((r) => !r.hideInMenu)
- .map((r) => ({
- key: r.path,
- icon: r.icon,
- label: r.label,
- }));
+const menuItems = toMenuItems(routes);
const RootLayout = () => {
const navigate = useNavigate();
@@ -42,6 +37,7 @@ const RootLayout = () => {