feat: 用户信息页面
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
import { GithubFilled, InfoCircleFilled, QuestionCircleFilled } from "@ant-design/icons";
|
||||
import { PageContainer, ProCard, ProLayout } from "@ant-design/pro-components";
|
||||
import { useState } from "react";
|
||||
import defaultProps from "./_defaultProps";
|
||||
import { Link, Outlet } from "react-router-dom";
|
||||
|
||||
export default () => {
|
||||
const [pathname, setPathname] = useState("/mainRouter/homeRouter");
|
||||
import defaultProps from "./defaultSettings.tsx";
|
||||
import { Link, Outlet, useLocation } from "react-router-dom";
|
||||
import logo from "@/assets/images/logo.png";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export default function Layout() {
|
||||
const location: any = useLocation();
|
||||
return (
|
||||
<div
|
||||
id="test-pro-layout"
|
||||
@@ -16,6 +16,11 @@ export default () => {
|
||||
height: "100vh",
|
||||
}}>
|
||||
<ProLayout
|
||||
logo={logo}
|
||||
layout={"mix"}
|
||||
// contentWidth={"Fluid"}
|
||||
menu={{ defaultOpenAll: true, hideMenuWhenCollapsed: false }}
|
||||
title={"五味子云存储"}
|
||||
siderWidth={216}
|
||||
menuItemRender={(menuItemProps, defaultDom) => {
|
||||
if (menuItemProps.isUrl || !menuItemProps.path) {
|
||||
@@ -24,15 +29,14 @@ export default () => {
|
||||
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
|
||||
}}
|
||||
{...defaultProps}
|
||||
location={{
|
||||
pathname,
|
||||
}}
|
||||
location={location}
|
||||
avatarProps={{
|
||||
src: "https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg",
|
||||
title: "七妮妮",
|
||||
size: "small",
|
||||
}}
|
||||
actionsRender={(props) => {
|
||||
actionsRender={(props: any) => {
|
||||
// eslint-disable-next-line react/prop-types
|
||||
if (props.isMobile) return [];
|
||||
return [
|
||||
<InfoCircleFilled key="InfoCircleFilled" />,
|
||||
@@ -41,17 +45,15 @@ export default () => {
|
||||
];
|
||||
}}>
|
||||
<PageContainer>
|
||||
<ProCard
|
||||
style={{
|
||||
height: "100vh",
|
||||
minHeight: 800,
|
||||
}}>
|
||||
<ProCard>
|
||||
<div>
|
||||
<Outlet />
|
||||
<Suspense>
|
||||
<Outlet />
|
||||
</Suspense>
|
||||
</div>
|
||||
</ProCard>
|
||||
</PageContainer>
|
||||
</ProLayout>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user