import React, { useState } from 'react'; import { Button, Result, Avatar, Tag, Input } from 'antd'; import { CrownOutlined, UserOutlined, SmileOutlined } from '@ant-design/icons'; import ProLayout, { PageContainer } from '@ant-design/pro-layout'; const defaultProps = { routes: [ { path: '/welcome', name: '欢迎', icon: , component: './Welcome', }, { path: '/admin/sub-page2', name: '二级页面', icon: , component: './Welcome', }, { path: '/admin/sub-page3', name: '三级页面', icon: , component: './Welcome', }, ], }; export default () => { const [pathname, setPathname] = useState('/welcome'); return ( <> console.log(e)} menuItemRender={(item, dom) => ( { setPathname(item.path || '/welcome'); }} > {dom} )} rightContentRender={() => (
} />
)} > null} tags={状态一} header={{ style: { padding: '4px 16px', position: 'fixed', top: 0, width: '100%', left: 0, zIndex: 999, boxShadow: '0 2px 8px #f0f1f2', }, }} style={{ paddingTop: 48, }} extra={[ , , , ]} >
Back Home} />
); };