🐛 fix site menu affix bug (#21188)

close #21128
This commit is contained in:
偏右 2020-02-03 12:35:04 +08:00 committed by afc163
parent 7715657cf1
commit 4d26ed83e3
2 changed files with 9 additions and 10 deletions

View File

@ -28,14 +28,13 @@
} }
} }
@media only screen and (max-width: 991.99px) { @media only screen and (max-width: @screen-lg) {
.main-menu { .main-container {
> div > .ant-affix { padding-right: 48px;
position: static !important; padding-left: 48px;
}
.main-menu-inner { .toc-affix {
max-height: none; display: none;
overflow: hidden;
} }
} }
.code-boxes-col-2-1, .code-boxes-col-2-1,

View File

@ -326,13 +326,13 @@ class MainContent extends Component {
{menuChild} {menuChild}
</MobileMenu> </MobileMenu>
) : ( ) : (
<Col xxl={4} xl={5} lg={6} md={24} sm={24} xs={24} className="main-menu"> <Col xxl={4} xl={5} lg={6} md={6} sm={24} xs={24} className="main-menu">
<Affix> <Affix>
<section className="main-menu-inner">{menuChild}</section> <section className="main-menu-inner">{menuChild}</section>
</Affix> </Affix>
</Col> </Col>
)} )}
<Col xxl={20} xl={19} lg={18} md={24} sm={24} xs={24}> <Col xxl={20} xl={19} lg={18} md={18} sm={24} xs={24}>
<section className={mainContainerClass}> <section className={mainContainerClass}>
{demos ? ( {demos ? (
<ComponentDoc <ComponentDoc