From e221476b348e7c243730dc7b1b22d0e1dbf9b9bd Mon Sep 17 00:00:00 2001
From: jiang <155259966@qq.com>
Date: Wed, 27 Dec 2017 14:16:44 +0800
Subject: [PATCH] Mobile menu (#463)
* Increase the sliding menu
* Add a simple animation
* update mobile menu
* update
* update
* update
* rebase master
* recovery import/first
---
package.json | 2 +
src/components/GlobalHeader/index.js | 16 ++-
src/components/GlobalHeader/index.less | 51 ++++++-
src/components/SiderMenu/SiderMenu.js | 162 ++++++++++++++++++++++
src/components/SiderMenu/index.js | 179 ++++---------------------
src/components/SiderMenu/index.less | 8 +-
src/layouts/BasicLayout.js | 19 +++
7 files changed, 272 insertions(+), 165 deletions(-)
create mode 100644 src/components/SiderMenu/SiderMenu.js
diff --git a/package.json b/package.json
index 163c65ca..1c072e77 100755
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"classnames": "^2.2.5",
"core-js": "^2.5.1",
"dva": "^2.1.0",
+ "enquire-js": "^0.1.1",
"g-cloud": "^1.0.2-beta",
"g2": "^2.3.13",
"g2-plugin-slider": "^1.2.1",
@@ -35,6 +36,7 @@
"numeral": "^2.0.6",
"prop-types": "^15.5.10",
"qs": "^6.5.0",
+ "rc-drawer-menu": "^0.5.0",
"react": "^16.0.0",
"react-container-query": "^0.9.1",
"react-document-title": "^2.0.3",
diff --git a/src/components/GlobalHeader/index.js b/src/components/GlobalHeader/index.js
index fa7aac79..6e39d2f8 100644
--- a/src/components/GlobalHeader/index.js
+++ b/src/components/GlobalHeader/index.js
@@ -1,10 +1,12 @@
import React, { PureComponent } from 'react';
-import { Layout, Menu, Icon, Spin, Tag, Dropdown, Avatar, message } from 'antd';
+import { Layout, Menu, Icon, Spin, Tag, Dropdown, Avatar, message, Divider } from 'antd';
import moment from 'moment';
import groupBy from 'lodash/groupBy';
import Debounce from 'lodash-decorators/debounce';
+import { Link } from 'dva/router';
import NoticeIcon from '../../components/NoticeIcon';
import HeaderSearch from '../../components/HeaderSearch';
+import logo from '../../assets/logo.svg';
import styles from './index.less';
const { Header } = Layout;
@@ -82,7 +84,7 @@ export default class GlobalHeader extends PureComponent {
}
render() {
const {
- currentUser, collapsed, fetchingNotices,
+ currentUser, collapsed, fetchingNotices, isMobile,
} = this.props;
const menu = (