| | |
| | | import logo from '@/assets/logo.png'; |
| | | import G6 from './G6'; |
| | | import { getMenuList } from '@/api/meun'; |
| | | import { BrowserRouter, Routes, Route } from 'react-router-dom'; |
| | | import Hello from './Hello'; |
| | | |
| | | const SearchInput = () => { |
| | | const { token } = theme.useToken(); |
| | |
| | | ); |
| | | }; |
| | | |
| | | const menuList = [ |
| | | { |
| | | "name": '列表页面', |
| | | "path": "/path1", |
| | | "component": Hello |
| | | }, |
| | | // ...其它项 |
| | | ] |
| | | const route = { |
| | | route: { |
| | | path: '/', |
| | | routes: menuList |
| | | }, |
| | | location: { |
| | | pathname: '/', |
| | | }, |
| | | } |
| | | |
| | | console.log(route); |
| | | console.log(defaultProps); |
| | | |
| | | export default () => { |
| | | if (typeof document === 'undefined') { |
| | | return <div />; |
| | |
| | | fixSiderbar: true, |
| | | layout: 'side', // mix top |
| | | splitMenus: true, |
| | | fixedHeader: true |
| | | }); |
| | | const [pathname, setPathname] = React.useState('/list/sub-page/sub-sub-page1'); |
| | | |
| | |
| | | |
| | | {/* <G6></G6> */} |
| | | <PageContainer> |
| | | <G6></G6> |
| | | <Routes> |
| | | <Route path="/list/sub-page/hello" element={<Hello />} /> |
| | | {/* 根据实际路由继续添加更多的 Route */} |
| | | </Routes> |
| | | {/* <G6></G6> */} |
| | | </PageContainer> |
| | | {/* <PageContainer |
| | | token={{ |