🐛 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) {
.main-menu {
> div > .ant-affix {
position: static !important;
}
.main-menu-inner {
max-height: none;
overflow: hidden;
@media only screen and (max-width: @screen-lg) {
.main-container {
padding-right: 48px;
padding-left: 48px;
.toc-affix {
display: none;
}
}
.code-boxes-col-2-1,

View File

@ -326,13 +326,13 @@ class MainContent extends Component {
{menuChild}
</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>
<section className="main-menu-inner">{menuChild}</section>
</Affix>
</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}>
{demos ? (
<ComponentDoc