Added Scrollbar.

This commit is contained in:
zuiidea
2018-10-12 22:05:16 +08:00
parent 0a3fac2e72
commit 66a6e55191
4 changed files with 34 additions and 7 deletions
+5
View File
@@ -14,6 +14,11 @@
width: 8px;
}
.ps__rail-y,
.ps__rail-x {
z-index: 9;
}
.ps__thumb-y {
width: 4px;
right: 4px;
+10 -2
View File
@@ -110,7 +110,12 @@ class PrimaryLayout extends PureComponent {
<Sider {...siderProps} />
)}
<div className={styles.container} id="primaryLayout">
<ScrollBar>
<ScrollBar
option={{
// Disabled horizontal scrolling, https://github.com/utatti/perfect-scrollbar#options
suppressScrollX: true,
}}
>
<Header {...headerProps} />
<Content className={styles.content}>
<Bread routeList={routeList} />
@@ -120,7 +125,10 @@ class PrimaryLayout extends PureComponent {
className={styles.backTop}
target={() => document.getElementById('primaryLayout')}
/>
<GlobalFooter copyright={config.copyright} />
<GlobalFooter
className={styles.footer}
copyright={config.copyright}
/>
</ScrollBar>
</div>
</Layout>
+9 -1
View File
@@ -24,8 +24,16 @@
flex: 1;
}
.footer {
background: #fff;
}
:global {
.antd-pro-global-footer-globalFooter {
margin-top: 16px;
margin-top: 0;
margin-bottom: 0;
padding-top: 24px;
padding-bottom: 24px;
background: #fff;
}
}
+10 -4
View File
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Row, Col, Card } from 'antd'
import { Color } from 'utils'
import { Page } from 'components'
import { Page, ScrollBar } from 'components'
import {
NumberCard,
Quote,
@@ -93,7 +93,9 @@ class Dashboard extends PureComponent {
background: Color.peach,
}}
>
<Quote {...quote} />
<ScrollBar>
<Quote {...quote} />
</ScrollBar>
</Card>
</Col>
</Row>
@@ -105,7 +107,9 @@ class Dashboard extends PureComponent {
</Col>
<Col lg={12} md={24}>
<Card bordered={false} {...bodyStyle}>
<Comments data={comments} />
<ScrollBar>
<Comments data={comments} />
</ScrollBar>
</Card>
</Col>
<Col lg={24} md={24}>
@@ -125,7 +129,9 @@ class Dashboard extends PureComponent {
</Col>
<Col lg={8} md={24}>
<Card bordered={false} {...bodyStyle}>
<Cpu {...cpu} />
<ScrollBar>
<Cpu {...cpu} />
</ScrollBar>
</Card>
</Col>
<Col lg={8} md={24}>