|
@@ -1,11 +1,52 @@
|
|
|
-import React, { useEffect } from 'react';
|
|
|
+import React, { useState, useEffect } from 'react';
|
|
|
import { useModel, useLocation, useIntl } from 'umi';
|
|
|
import styles from './index.less';
|
|
|
+import { MenuFoldOutlined } from '@ant-design/icons';
|
|
|
+import Icon from '@/tenants-ui/Icon';
|
|
|
+
|
|
|
+import { Drawer } from 'antd';
|
|
|
+import NavMenu from '@/components/navMenu';
|
|
|
|
|
|
export default (props) => {
|
|
|
+ const { menuVisible, closeMenu, toggleMenu } = useModel('controller');
|
|
|
+
|
|
|
+ const showMenuClick = () => {
|
|
|
+ // toggleMenu();
|
|
|
+ };
|
|
|
return (
|
|
|
- <>
|
|
|
- <div className={styles.layout}>{props.children}</div>
|
|
|
- </>
|
|
|
+ <div className={styles.layout}>
|
|
|
+ <div className={styles.header}>
|
|
|
+ <div className={styles.title}>之江项目</div>
|
|
|
+ <div className={styles.right}>
|
|
|
+ <div className={styles.picture}></div>
|
|
|
+ <Icon className={styles.notify} type="notify" style={{ fontSize: 21 }}></Icon>
|
|
|
+ <MenuFoldOutlined style={{ fontSize: 24 }} onClick={showMenuClick} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {props.children}
|
|
|
+ <Drawer
|
|
|
+ title=""
|
|
|
+ placement="right"
|
|
|
+ closable={false}
|
|
|
+ onClose={closeMenu}
|
|
|
+ visible={menuVisible}
|
|
|
+ drawerStyle={
|
|
|
+ {
|
|
|
+ // height: 340,
|
|
|
+ // width: 380,
|
|
|
+ // background: 'transparent',
|
|
|
+ // transform: 'translate(-50px,20px)',
|
|
|
+ // top: 100,
|
|
|
+ //right: 20,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ maskStyle={{ background: 'transparent' }}
|
|
|
+ contentWrapperStyle={{ boxShadow: 'none' }}
|
|
|
+ bodyStyle={{ transform: 'translate(-20px,20px)' }}
|
|
|
+ >
|
|
|
+ <NavMenu></NavMenu>
|
|
|
+ </Drawer>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|