Commit b4b6aadf authored by 何乐's avatar 何乐 Committed by 陈帅

fix: different card heights in Analysis (#3386)

* fix: different card heights in Analysis

* add padding for Pie in ProportionSales

* adjust style
parent 186abaca
...@@ -144,6 +144,7 @@ class Analysis extends Component { ...@@ -144,6 +144,7 @@ class Analysis extends Component {
selectDate={this.selectDate} selectDate={this.selectDate}
/> />
</Suspense> </Suspense>
<div className={styles.twoColLayout}>
<Row gutter={24}> <Row gutter={24}>
<Col xl={12} lg={24} md={24} sm={24} xs={24}> <Col xl={12} lg={24} md={24} sm={24} xs={24}>
<Suspense fallback={null}> <Suspense fallback={null}>
...@@ -168,6 +169,7 @@ class Analysis extends Component { ...@@ -168,6 +169,7 @@ class Analysis extends Component {
</Suspense> </Suspense>
</Col> </Col>
</Row> </Row>
</div>
<Suspense fallback={null}> <Suspense fallback={null}>
<OfflineData <OfflineData
activeKey={activeKey} activeKey={activeKey}
......
...@@ -134,6 +134,25 @@ ...@@ -134,6 +134,25 @@
} }
} }
.twoColLayout {
.salesCard {
height: calc(100% - 24px);
}
div[class^='ant-col']:last-child {
right: 0\9;
height: 100%\9;
position: absolute\9;
}
:global {
.ant-row {
display: flex;
display: block\9;
flex-flow: row wrap;
position: relative\9;
}
}
}
.trendText { .trendText {
margin-left: 8px; margin-left: 8px;
color: @heading-color; color: @heading-color;
......
...@@ -38,12 +38,7 @@ const ProportionSales = memo( ...@@ -38,12 +38,7 @@ const ProportionSales = memo(
} }
style={{ marginTop: 24 }} style={{ marginTop: 24 }}
> >
<div <h4 style={{ marginTop: 10, marginBottom: 32 }}>
style={{
minHeight: 380,
}}
>
<h4 style={{ marginTop: 8, marginBottom: 32 }}>
<FormattedMessage id="app.analysis.sales" defaultMessage="Sales" /> <FormattedMessage id="app.analysis.sales" defaultMessage="Sales" />
</h4> </h4>
<Pie <Pie
...@@ -52,10 +47,10 @@ const ProportionSales = memo( ...@@ -52,10 +47,10 @@ const ProportionSales = memo(
total={() => <Yuan>{salesPieData.reduce((pre, now) => now.y + pre, 0)}</Yuan>} total={() => <Yuan>{salesPieData.reduce((pre, now) => now.y + pre, 0)}</Yuan>}
data={salesPieData} data={salesPieData}
valueFormat={value => <Yuan>{value}</Yuan>} valueFormat={value => <Yuan>{value}</Yuan>}
height={248} height={270}
lineWidth={4} lineWidth={4}
style={{ padding: '8px 0' }}
/> />
</div>
</Card> </Card>
) )
); );
......
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