Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adx-manager-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨贺晨吉
adx-manager-node
Commits
4fe66735
Commit
4fe66735
authored
Apr 08, 2025
by
蒋佳奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: menu style opt
parent
bbd5c058
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
14 deletions
+26
-14
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+22
-11
[...all].tsx
src/pages/[...all].tsx
+3
-3
index.tsx
src/pages/index.tsx
+1
-0
No files found.
src/layouts/BasicLayout.tsx
View file @
4fe66735
import
{
useNavigate
}
from
'react-router-dom'
import
{
UserOutlined
,
SettingOutlined
}
from
'@ant-design/icons'
import
{
DashboardOutlined
}
from
'@ant-design/icons'
// src/layouts/BasicLayout.tsx
import
{
Layout
,
Menu
,
theme
}
from
'antd'
const
{
Header
,
Content
,
Sider
}
=
Layout
const
{
Header
,
Content
,
Sider
}
=
Layout
const
menuItems
=
[
const
menuItems
=
[
{
{
key
:
'/'
,
key
:
'user'
,
icon
:
<
DashboardOutlined
/>,
icon
:
<
UserOutlined
/>,
label
:
'Dashboard'
,
label
:
'用户管理'
,
children
:
[
{
key
:
'/user/list'
,
label
:
'人员列表'
,
},
{
key
:
'/user/dept'
,
label
:
'组织架构'
,
},
],
},
{
key
:
'/system'
,
icon
:
<
SettingOutlined
/>,
label
:
'系统管理'
,
},
},
]
]
...
@@ -21,11 +32,11 @@ const BasicLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
...
@@ -21,11 +32,11 @@ const BasicLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
const
navigate
=
useNavigate
()
const
navigate
=
useNavigate
()
return
(
return
(
<
Layout
className=
'
min-
h-screen text-9xl'
>
<
Layout
className=
'h-screen text-9xl'
>
<
Header
className=
'p-0'
/>
<
Header
className=
'p-0'
/>
<
Layout
>
<
Layout
>
<
Sider
breakpoint=
'lg'
>
<
Sider
breakpoint=
'lg'
collapsible
>
<
Menu
theme=
'dark'
mode=
'
vertical
'
items=
{
menuItems
}
onSelect=
{
({
key
})
=>
navigate
(
key
)
}
/>
<
Menu
theme=
'dark'
mode=
'
inline
'
items=
{
menuItems
}
onSelect=
{
({
key
})
=>
navigate
(
key
)
}
/>
</
Sider
>
</
Sider
>
<
Content
className=
'mt-6 mx-4'
>
<
Content
className=
'mt-6 mx-4'
>
<
div
className=
'p-6'
style=
{
{
background
:
colorBgContainer
}
}
>
<
div
className=
'p-6'
style=
{
{
background
:
colorBgContainer
}
}
>
...
...
src/pages/[...all].tsx
View file @
4fe66735
import
{
useNavigate
}
from
'react-router-dom'
const
NotFound
:
React
.
FC
=
()
=>
{
export
default
function
NotFound
()
{
const
navigate
=
useNavigate
()
const
navigate
=
useNavigate
()
return
(
return
(
...
@@ -16,3 +14,5 @@ export default function NotFound() {
...
@@ -16,3 +14,5 @@ export default function NotFound() {
/>
/>
)
)
}
}
export
default
NotFound
src/pages/index.tsx
View file @
4fe66735
...
@@ -16,6 +16,7 @@ const Home: React.FC = () => {
...
@@ -16,6 +16,7 @@ const Home: React.FC = () => {
return
(
return
(
<
div
>
<
div
>
<
header
>
首页
</
header
>
<
header
>
首页
</
header
>
<
p
>
WelCome!
</
p
>
<
Button
loading=
{
loading
}
onClick=
{
()
=>
run
()
}
>
<
Button
loading=
{
loading
}
onClick=
{
()
=>
run
()
}
>
测试
测试
</
Button
>
</
Button
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment