diff --git a/src/routes/Userinfo/Info.js b/src/routes/Userinfo/Info.js
index 68683b9e1910a4b1e4929b617301a0e6149b5799..17a7852fd53395d07e6a9e5662adf448d970bcb3 100644
--- a/src/routes/Userinfo/Info.js
+++ b/src/routes/Userinfo/Info.js
@@ -1,7 +1,9 @@
-import React, { PureComponent } from 'react';
+import React, { Component } from 'react';
import { connect } from 'dva';
import { Route, routerRedux, Switch, Redirect } from 'dva/router';
import { Menu } from 'antd';
+import Debounce from 'lodash-decorators/debounce';
+import Bind from 'lodash-decorators/bind';
import styles from './Info.less';
import { getRoutes } from '../../utils/utils';
@@ -17,7 +19,7 @@ const menuMap = {
@connect(({ user }) => ({
currentUser: user.currentUser,
}))
-export default class Info extends PureComponent {
+export default class Info extends Component {
constructor(props) {
super(props);
const { match, location } = props;
@@ -25,10 +27,20 @@ export default class Info extends PureComponent {
key = menuMap[key] ? key : 'base';
this.state = {
selectKey: key,
+ meunMode: 'inline',
};
}
+ componentDidMount() {
+ this.resize();
+ window.addEventListener('resize', this.resize);
+ }
+ componentWillUnmount() {
+ window.removeEventListener('resize', this.resize);
+ }
getmenu = () => {
- return Object.keys(menuMap).map(item =>