| | |
| | | name: '列表页面', |
| | | routes: [ |
| | | { |
| | | path: 'sub-sub-page1', |
| | | path: '/list/sub-sub-page1', |
| | | name: '一级列表页面', |
| | | component: './Hello', |
| | | }, |
| | | { |
| | | path: 'hello', |
| | | path: '/list/hello', |
| | | name: '你好世界', |
| | | component: 'Hello', |
| | | component: React.lazy(() => import('./Hello')), |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | pathname: '/', |
| | | }, |
| | | } |
| | | |
| | | const menu0 = [ |
| | | { |
| | | "path": "/path2", |
| | | "component": Hello |
| | | } |
| | | ] |
| | | |
| | | export default () => { |
| | | if (typeof document === 'undefined') { |
| | |
| | | colorBgMenuItemSelected: 'rgba(0,0,0,0.04)', |
| | | }, |
| | | }} |
| | | siderMenuType="group" |
| | | siderMenuType="sub" // group |
| | | menu={{ |
| | | collapsedShowGroupTitle: true, |
| | | }} |
| | |
| | | }} |
| | | // menu 菜单的头部点击事件 |
| | | onMenuHeaderClick={(e) => console.log(e)} |
| | | // Header 自定义菜单项的 render 方法 |
| | | // 自定义菜单项的 render 方法 |
| | | menuItemRender={(item, dom) => ( |
| | | <div |
| | | onClick={() => { |
| | | console.log(dom); |
| | | setPathname(item.path); |
| | | }} |
| | | > |
| | |
| | | )} |
| | | {...settings} |
| | | > |
| | | |
| | | {/* <G6></G6> */} |
| | | <PageContainer> |
| | | <Routes> |
| | | {menu0.map(item => |
| | | <Route key={item.path} path={item.path} element={React.createElement(item.component)} /> |
| | | )} |
| | | <Route key='/list/sub-page/hello' path='/list/sub-page/hello' element={React.lazy(() => import('./Hello'))} /> |
| | | </Routes> |
| | | {/* <G6></G6> */} |
| | | </PageContainer> |
| | | {/* <PageContainer |
| | | token={{ |
| | | paddingInlinePageContainerContent: num, |
| | | }} |
| | | extra={[ |
| | | <Button key="3">操作</Button>, |
| | | <Button key="2">操作</Button>, |
| | | <Button |
| | | key="1" |
| | | type="primary" |
| | | onClick={() => { |
| | | setNum(num > 0 ? 0 : 40); |
| | | }} |
| | | > |
| | | 主操作 |
| | | </Button>, |
| | | ]} |
| | | subTitle="简单的描述" |
| | | footer={[ |
| | | <Button key="3">重置</Button>, |
| | | <Button key="2" type="primary"> |
| | | 提交 |
| | | </Button>, |
| | | ]} |
| | | > |
| | | |
| | | <ProCard |
| | | style={{ |
| | | height: '200vh', |
| | | minHeight: 800, |
| | | }} |
| | | > |
| | | <div /> |
| | | </ProCard> |
| | | |
| | | </PageContainer> */} |
| | | |
| | | <SettingDrawer |
| | | pathname={pathname} |
| | |
| | | padding: 0; |
| | | box-sizing: border-box; |
| | | text-decoration: none; |
| | | } |
| | | |
| | | .layout__loading { |
| | | position: fixed; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate3d(-50%, -50%, 0); |
| | | } |