Commit 017a406d authored by qixian.cs@outlook.com's avatar qixian.cs@outlook.com

fix ci errot

parent 22785c32
...@@ -137,6 +137,7 @@ class SettingDarwer extends PureComponent { ...@@ -137,6 +137,7 @@ class SettingDarwer extends PureComponent {
parent={null} parent={null}
level={null} level={null}
open={collapse} open={collapse}
mask={false}
onHandleClick={this.togglerContent} onHandleClick={this.togglerContent}
handleChild={ handleChild={
!collapse ? ( !collapse ? (
...@@ -211,7 +212,7 @@ class SettingDarwer extends PureComponent { ...@@ -211,7 +212,7 @@ class SettingDarwer extends PureComponent {
<Divider /> <Divider />
<Body title="导航设置 "> <Body title="其他设置 ">
<List.Item <List.Item
actions={[ actions={[
<Select <Select
......
...@@ -19,15 +19,6 @@ const menuMap = { ...@@ -19,15 +19,6 @@ const menuMap = {
currentUser: user.currentUser, currentUser: user.currentUser,
})) }))
export default class Info extends Component { 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) { constructor(props) {
super(props); super(props);
const { match, location } = props; const { match, location } = props;
...@@ -38,6 +29,15 @@ export default class Info extends Component { ...@@ -38,6 +29,15 @@ export default class Info extends Component {
mode: 'inline', 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() { componentDidMount() {
window.addEventListener('resize', this.resize); window.addEventListener('resize', this.resize);
this.resize(); this.resize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment