/** @format */ import { GithubFilled, InfoCircleFilled, LogoutOutlined, QuestionCircleFilled, } from "@ant-design/icons"; import { DefaultFooter, PageContainer, ProCard, ProLayout, } from "@ant-design/pro-components"; import { Link, Outlet, useLocation } from "react-router-dom"; import logo from "@/assets/images/logo.png"; import { Suspense } from "react"; import { Dropdown } from "antd"; import settings from "@/views/Main/settings.tsx"; // import { getUserMenuPermission } from "@/api/user"; export default function Layout() { const location = useLocation(); return (
{ if (menuItemProps.isUrl || !menuItemProps.path) { return defaultDom; } return {defaultDom}; }} {...settings} menu={{ // request: async () => { // const res: any = await getUserMenuPermission("17"); // return res.data.routes; // }, type: "group", defaultOpenAll: false, hideMenuWhenCollapsed: false, collapsedShowTitle: false, }} disableMobile={false} location={{ pathname: location.pathname, }} avatarProps={{ src: "https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg", title: "七妮妮", size: "large", // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-expect-error render: (props, dom) => { return ( , label: "退出登录", }, ], }}> {dom} ); }, }} actionsRender={(props: any) => { // eslint-disable-next-line react/prop-types if (props.isMobile) return []; return [ , , , ]; }} breadcrumbRender={(routers = []) => [ { path: "/main/home", title: "主页", }, ...routers, ]} footerRender={() => ( )}>
); }