Commit 128c8ea2 authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

fix #2177 if collapsed is true, you need to click twice to display

parent cd6c61db
...@@ -106,8 +106,15 @@ class BasicLayout extends React.PureComponent { ...@@ -106,8 +106,15 @@ class BasicLayout extends React.PureComponent {
}); });
} }
componentDidUpdate() { componentDidUpdate(preProps) {
// After changing to phone mode,
// if collapsed is true, you need to click twice to display
this.breadcrumbNameMap = this.getBreadcrumbNameMap(); this.breadcrumbNameMap = this.getBreadcrumbNameMap();
const { isMobile } = this.state;
const { collapsed } = this.props;
if (isMobile && !preProps.isMobile && !collapsed) {
this.handleMenuCollapse(false);
}
} }
componentWillUnmount() { componentWillUnmount() {
......
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