refactor: 前端应用骨架迁移至 zustand 并统一路由权限壳
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import { useNavigate, useLocation } from 'react-router-dom';
|
||||
import { useNavigate, useLocation } from 'react-router';
|
||||
import { Layout, Menu, Button, Avatar, Badge, Dropdown, Drawer, Grid, Tooltip } from 'antd';
|
||||
import { BrandLogo } from '../components/BrandLogo';
|
||||
import {
|
||||
DashboardOutlined,
|
||||
TeamOutlined,
|
||||
@@ -262,7 +263,17 @@ const MainLayout: React.FC = () => {
|
||||
borderBottom: '1px solid #e5e5e7',
|
||||
}}
|
||||
>
|
||||
{collapsed ? '学' : '学生管理系统'}
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
gap: 8,
|
||||
}}
|
||||
>
|
||||
<BrandLogo size={collapsed ? 26 : 30} />
|
||||
{!collapsed && <span>学生管理系统</span>}
|
||||
</div>
|
||||
</div>
|
||||
{menuContent}
|
||||
</Sider>
|
||||
@@ -275,7 +286,12 @@ const MainLayout: React.FC = () => {
|
||||
size={240}
|
||||
styles={{ body: { padding: 0 } }}
|
||||
className="app-navigation-drawer"
|
||||
title="学生管理系统"
|
||||
title={
|
||||
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}>
|
||||
<BrandLogo size={24} />
|
||||
学生管理系统
|
||||
</span>
|
||||
}
|
||||
>
|
||||
{menuContent}
|
||||
</Drawer>
|
||||
|
||||
Reference in New Issue
Block a user