Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ant-design-pro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thiago Borges
ant-design-pro
Commits
30472299
Commit
30472299
authored
Oct 31, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove spinning of analysis page cards
parent
c1f40265
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
15 deletions
+5
-15
index.js
src/components/Charts/ChartCard/index.js
+4
-6
Analysis.js
src/routes/Dashboard/Analysis.js
+1
-9
No files found.
src/components/Charts/ChartCard/index.js
View file @
30472299
...
...
@@ -3,7 +3,9 @@ import { Card, Spin } from 'antd';
import
styles
from
'./index.less'
;
const
ChartCard
=
({
loading
,
contentHeight
,
title
,
action
,
total
,
footer
,
children
,
...
rest
})
=>
{
const
ChartCard
=
({
loading
=
false
,
contentHeight
,
title
,
action
,
total
,
footer
,
children
,
...
rest
})
=>
{
const
content
=
(
<
div
className
=
{
styles
.
chartCard
}
>
<
div
className
=
{
styles
.
meta
}
>
...
...
@@ -34,11 +36,7 @@ const ChartCard = ({ loading, contentHeight, title, action, total, footer, child
bodyStyle
=
{{
padding
:
'20px 24px 8px 24px'
}}
{...
rest
}
>
{
loading
?
(
<
Spin
size
=
"large"
>
{
content
}
<
/Spin
>
)
:
content
}
{
<
Spin
spinning
=
{
loading
}
>
{
content
}
<
/Spin>
}
<
/Card
>
);
};
...
...
src/routes/Dashboard/Analysis.js
View file @
30472299
...
...
@@ -36,11 +36,7 @@ export default class Analysis extends Component {
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'chart/fetch'
,
}).
then
(()
=>
{
this
.
setState
({
loading
:
false
,
});
});
}).
then
(()
=>
this
.
setState
({
loading
:
false
}));
}
componentWillUnmount
()
{
...
...
@@ -226,7 +222,6 @@ export default class Analysis extends Component {
<
Row
gutter
=
{
24
}
>
<
Col
{...
topColResponsiveProps
}
>
<
ChartCard
loading
=
{
loading
}
bordered
=
{
false
}
title
=
"总销售额"
action
=
{
<
Tooltip
title
=
"指标说明"
><
Icon
type
=
"info-circle-o"
/><
/Tooltip>
}
...
...
@@ -244,7 +239,6 @@ export default class Analysis extends Component {
<
/Col
>
<
Col
{...
topColResponsiveProps
}
>
<
ChartCard
loading
=
{
loading
}
bordered
=
{
false
}
title
=
"访问量"
action
=
{
<
Tooltip
title
=
"指标说明"
><
Icon
type
=
"info-circle-o"
/><
/Tooltip>
}
...
...
@@ -261,7 +255,6 @@ export default class Analysis extends Component {
<
/Col
>
<
Col
{...
topColResponsiveProps
}
>
<
ChartCard
loading
=
{
loading
}
bordered
=
{
false
}
title
=
"支付笔数"
action
=
{
<
Tooltip
title
=
"指标说明"
><
Icon
type
=
"info-circle-o"
/><
/Tooltip>
}
...
...
@@ -277,7 +270,6 @@ export default class Analysis extends Component {
<
/Col
>
<
Col
{...
topColResponsiveProps
}
>
<
ChartCard
loading
=
{
loading
}
bordered
=
{
false
}
title
=
"运营活动效果"
action
=
{
<
Tooltip
title
=
"指标说明"
><
Icon
type
=
"info-circle-o"
/><
/Tooltip>
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment