qixian.cs@outlook.com 7 роки тому
батько
коміт
017a406dbb

+ 2 - 1
src/components/SettingDarwer/index.js

@@ -137,6 +137,7 @@ class SettingDarwer extends PureComponent {
           parent={null}
           level={null}
           open={collapse}
+          mask={false}
           onHandleClick={this.togglerContent}
           handleChild={
             !collapse ? (
@@ -211,7 +212,7 @@ class SettingDarwer extends PureComponent {
 
             <Divider />
 
-            <Body title="导航设置 ">
+            <Body title="其他设置 ">
               <List.Item
                 actions={[
                   <Select

+ 9 - 9
src/routes/Account/Settings/Info.js

@@ -19,15 +19,6 @@ const menuMap = {
   currentUser: user.currentUser,
 }))
 export default class Info extends Component {
-  static getDerivedStateFromProps(props, state) {
-    const { match, location } = props;
-    let selectKey = location.pathname.replace(`${match.path}/`, '');
-    selectKey = menuMap[selectKey] ? selectKey : 'base';
-    if (selectKey !== state.selectKey) {
-      return { selectKey };
-    }
-    return null;
-  }
   constructor(props) {
     super(props);
     const { match, location } = props;
@@ -38,6 +29,15 @@ export default class Info extends Component {
       mode: 'inline',
     };
   }
+  static getDerivedStateFromProps(props, state) {
+    const { match, location } = props;
+    let selectKey = location.pathname.replace(`${match.path}/`, '');
+    selectKey = menuMap[selectKey] ? selectKey : 'base';
+    if (selectKey !== state.selectKey) {
+      return { selectKey };
+    }
+    return null;
+  }
   componentDidMount() {
     window.addEventListener('resize', this.resize);
     this.resize();