Browse Source

fix ci errot

pull/1630/head
qixian.cs@outlook.com 8 years ago
parent
commit
017a406dbb
  1. 3
      src/components/SettingDarwer/index.js
  2. 18
      src/routes/Account/Settings/Info.js

3
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

18
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();

Loading…
Cancel
Save