菜单模块增删改查

This commit is contained in:
mmc
2026-04-28 14:45:07 +08:00
parent c08278190a
commit 2a2d40d772
6 changed files with 532 additions and 528 deletions

View File

@@ -4,6 +4,8 @@ import {
Layout, Menu, Button, Space, ConfigProvider, theme,
Breadcrumb, Badge, message
} from 'antd';
// 先引入中文语言包
import zhCN from 'antd/locale/zh_CN';
import {
DashboardOutlined, ExperimentOutlined, VideoCameraOutlined,
BellOutlined, DownloadOutlined, UserOutlined, LogoutOutlined,
@@ -15,6 +17,7 @@ import { RootState, useAppDispatch } from '../store';
import { logout } from '../store/userSlice';
import { getMenuList } from '../api/mune';
const { Header, Sider, Content } = Layout;
export default function AppLayout() {
@@ -26,6 +29,8 @@ export default function AppLayout() {
const { userInfo } = useSelector((state: RootState) => state.user);
const dispatch = useAppDispatch();
const getMenu = () => {
getMenuList().then(res => {
if (res.code == 200) {
@@ -66,6 +71,7 @@ export default function AppLayout() {
return (
<ConfigProvider
locale={zhCN}
theme={{
algorithm: theme.defaultAlgorithm,
token: { colorPrimary: '#1890ff', borderRadius: 2 },
@@ -111,7 +117,11 @@ export default function AppLayout() {
</div>
</Header>
<Layout>
<Layout style={{
overflow: 'auto', background: '#ffffff',
height: "calc(100vh - 50px)",
overflowX: 'hidden'
}}>
{/* 左侧:菜单 + 下部区域 */}
<Sider
trigger={null}
@@ -141,11 +151,12 @@ export default function AppLayout() {
</Sider>
{/* 右侧:主内容 */}
<Content className=" overflow-y-auto bg-[#f4f7f9] min-h-0">
<Content className=" overflow-y-auto bg-[#f4f7f9] min-h-0 overflow-x-hidden">
<Outlet />
</Content>
</Layout>
</Layout>
</ConfigProvider>
</ConfigProvider >
);
}