diff --git a/src/routes/Userinfo/BaseView.less b/src/routes/Userinfo/BaseView.less
index 81566c6d5b790d90c3a98dc311fde270ccbd5f14..f82aba5636faeaaf31e692327a3f7a641964a30d 100644
--- a/src/routes/Userinfo/BaseView.less
+++ b/src/routes/Userinfo/BaseView.less
@@ -3,16 +3,7 @@
.baseView {
display: flex;
margin-top: 12px;
- &.md {
- flex-direction: column-reverse;
- .right {
- padding: 20px;
- display: flex;
- flex-direction: column;
- align-items: center;
- max-width: 448px;
- }
- }
+
.left {
max-width: 448px;
min-width: 224px;
@@ -22,8 +13,8 @@
padding-left: 104px;
.avatar_title {
height: 22px;
- font-size: 14px;
- color: rgba(0, 0, 0, 0.85);
+ font-size: @font-size-base;
+ color: @heading-color;
line-height: 22px;
margin-bottom: 8px;
}
@@ -42,3 +33,17 @@
}
}
}
+
+@media screen and (max-width: @screen-xl) {
+ .baseView {
+ flex-direction: column-reverse;
+
+ .right {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ max-width: 448px;
+ }
+ }
+}
diff --git a/src/routes/Userinfo/Info.js b/src/routes/Userinfo/Info.js
index 17a7852fd53395d07e6a9e5662adf448d970bcb3..135b337db049c164184386eb12151dd5817d1baa 100644
--- a/src/routes/Userinfo/Info.js
+++ b/src/routes/Userinfo/Info.js
@@ -2,8 +2,6 @@ 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';
@@ -27,16 +25,8 @@ export default class Info extends Component {
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 => (
- {menuMap[item]}
@@ -51,19 +41,6 @@ export default class Info extends Component {
selectKey: key,
});
};
- @Bind()
- @Debounce(200)
- resize() {
- if (window.innerWidth > 768 || window.innerWidth < 454) {
- this.setState({
- meunMode: 'inline',
- });
- return;
- }
- this.setState({
- meunMode: 'horizontal',
- });
- }
render() {
const { match, routerData, currentUser } = this.props;
if (!currentUser.userid) {
@@ -73,7 +50,7 @@ export default class Info extends Component {