|
|
@@ -18,6 +18,8 @@ import Exception403 from '../pages/Exception/403';
|
|
|
import PageLoading from '@/components/PageLoading';
|
|
|
import SiderMenu from '@/components/SiderMenu';
|
|
|
|
|
|
+import styles from './BasicLayout.less';
|
|
|
+
|
|
|
// lazy load SettingDrawer
|
|
|
const SettingDrawer = React.lazy(() => import('@/components/SettingDrawer'));
|
|
|
|
|
|
@@ -138,14 +140,6 @@ class BasicLayout extends React.PureComponent {
|
|
|
return null;
|
|
|
};
|
|
|
|
|
|
- getContentStyle = () => {
|
|
|
- const { fixedHeader } = this.props;
|
|
|
- return {
|
|
|
- margin: '24px 24px 0',
|
|
|
- paddingTop: fixedHeader ? 64 : 0,
|
|
|
- };
|
|
|
- };
|
|
|
-
|
|
|
handleMenuCollapse = collapsed => {
|
|
|
const { dispatch } = this.props;
|
|
|
dispatch({
|
|
|
@@ -172,10 +166,12 @@ class BasicLayout extends React.PureComponent {
|
|
|
isMobile,
|
|
|
menuData,
|
|
|
breadcrumbNameMap,
|
|
|
+ fixedHeader,
|
|
|
} = this.props;
|
|
|
|
|
|
const isTop = PropsLayout === 'topmenu';
|
|
|
const routerConfig = this.matchParamsPath(pathname, breadcrumbNameMap);
|
|
|
+ const contentStyle = !fixedHeader ? { paddingTop: 0 } : {};
|
|
|
const layout = (
|
|
|
<Layout>
|
|
|
{isTop && !isMobile ? null : (
|
|
|
@@ -201,7 +197,7 @@ class BasicLayout extends React.PureComponent {
|
|
|
isMobile={isMobile}
|
|
|
{...this.props}
|
|
|
/>
|
|
|
- <Content style={this.getContentStyle()}>
|
|
|
+ <Content className={styles.content} style={contentStyle}>
|
|
|
<Authorized
|
|
|
authority={routerConfig && routerConfig.authority}
|
|
|
noMatch={<Exception403 />}
|