mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
29 lines
805 B
TypeScript
29 lines
805 B
TypeScript
import React from 'react';
|
|
import { Layout, Menu, Breadcrumb } from 'antd';
|
|
import { Link } from 'umi';
|
|
import './style.less';
|
|
import Icon from '@/components/icons';
|
|
|
|
export function SideMenuLayout(props: any) {
|
|
const { menu = [] } = props.page;
|
|
console.log(menu);
|
|
return (
|
|
<Layout style={{height: 'calc(100vh - 48px)'}}>
|
|
<Layout.Sider className={'nb-sider'} theme={'light'}>
|
|
<Menu mode={'inline'} defaultSelectedKeys={['2']}>
|
|
{menu.map(item => (
|
|
<Menu.Item key={item.path}>
|
|
<Link to={item.path}><Icon type={item.icon}/> {item.title}</Link>
|
|
</Menu.Item>
|
|
))}
|
|
</Menu>
|
|
</Layout.Sider>
|
|
<Layout.Content>
|
|
{props.children}
|
|
</Layout.Content>
|
|
</Layout>
|
|
);
|
|
};
|
|
|
|
export default SideMenuLayout;
|