Commit e1e0a7d2 authored by 陈帅's avatar 陈帅

style: Card should not use Spin

parent fba1af02
import React from 'react'; import React from 'react';
import { Card, Spin } from 'antd'; import { Card } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import styles from './index.less'; import styles from './index.less';
...@@ -64,12 +64,8 @@ const ChartCard = ({ ...@@ -64,12 +64,8 @@ const ChartCard = ({
); );
return ( return (
<Card bodyStyle={{ padding: '20px 24px 8px 24px' }} {...rest}> <Card loading={loading} bodyStyle={{ padding: '20px 24px 8px 24px' }} {...rest}>
{ {content}
<Spin spinning={loading} wrapperClassName={styles.spin}>
{content}
</Spin>
}
</Card> </Card>
); );
}; };
......
...@@ -72,7 +72,3 @@ ...@@ -72,7 +72,3 @@
margin-top: 20px; margin-top: 20px;
} }
} }
.spin :global(.ant-spin-container) {
overflow: visible;
}
...@@ -261,6 +261,7 @@ export default class Analysis extends Component { ...@@ -261,6 +261,7 @@ export default class Analysis extends Component {
<ChartCard <ChartCard
bordered={false} bordered={false}
title="总销售额" title="总销售额"
loading={loading}
action={ action={
<Tooltip title="指标说明"> <Tooltip title="指标说明">
<Icon type="info-circle-o" /> <Icon type="info-circle-o" />
...@@ -284,6 +285,7 @@ export default class Analysis extends Component { ...@@ -284,6 +285,7 @@ export default class Analysis extends Component {
<ChartCard <ChartCard
bordered={false} bordered={false}
title="访问量" title="访问量"
loading={loading}
action={ action={
<Tooltip title="指标说明"> <Tooltip title="指标说明">
<Icon type="info-circle-o" /> <Icon type="info-circle-o" />
...@@ -300,6 +302,7 @@ export default class Analysis extends Component { ...@@ -300,6 +302,7 @@ export default class Analysis extends Component {
<ChartCard <ChartCard
bordered={false} bordered={false}
title="支付笔数" title="支付笔数"
loading={loading}
action={ action={
<Tooltip title="指标说明"> <Tooltip title="指标说明">
<Icon type="info-circle-o" /> <Icon type="info-circle-o" />
...@@ -316,6 +319,7 @@ export default class Analysis extends Component { ...@@ -316,6 +319,7 @@ export default class Analysis extends Component {
<ChartCard <ChartCard
bordered={false} bordered={false}
title="运营活动效果" title="运营活动效果"
loading={loading}
action={ action={
<Tooltip title="指标说明"> <Tooltip title="指标说明">
<Icon type="info-circle-o" /> <Icon type="info-circle-o" />
......
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