Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
6481a3af
Commit
6481a3af
authored
Apr 29, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix danger warning
parent
df0ffd6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/components/Charts/index.js
src/components/Charts/index.js
+1
-1
src/routes/Dashboard/Analysis.js
src/routes/Dashboard/Analysis.js
+9
-9
No files found.
src/components/Charts/index.js
View file @
6481a3af
...
...
@@ -13,7 +13,7 @@ import WaterWave from './WaterWave';
import
TagCloud
from
'
./TagCloud
'
;
import
TimelineChart
from
'
./TimelineChart
'
;
const
yuan
=
val
=>
`
¥
${
numeral
(
val
).
format
(
'
0,0
'
)}
`
;
const
yuan
=
val
=>
`
¥
${
numeral
(
val
).
format
(
'
0,0
'
)}
`
;
const
Charts
=
{
yuan
,
...
...
src/routes/Dashboard/Analysis.js
View file @
6481a3af
...
...
@@ -42,6 +42,10 @@ for (let i = 0; i < 7; i += 1) {
});
}
const
Yuan
=
({
children
})
=>
(
<
span
dangerouslySetInnerHTML
=
{{
__html
:
yuan
(
children
)
}}
/> /
*
eslint
-
disable
-
line
react
/
no
-
danger
*
/
);
@
connect
(({
chart
,
loading
})
=>
({
chart
,
loading
:
loading
.
effects
[
'
chart/fetch
'
],
...
...
@@ -252,7 +256,7 @@ export default class Analysis extends Component {
<
Icon
type
=
"
info-circle-o
"
/>
<
/Tooltip
>
}
total
=
{()
=>
<
span
dangerouslySetInnerHTML
=
{{
__html
:
yuan
(
126560
)
}}
/
>
}
total
=
{()
=>
<
Yuan
>
126560
<
/Yuan
>
}
footer
=
{
<
Field
label
=
"
日均销售额
"
value
=
{
`¥
${
numeral
(
12423
).
format
(
'
0,0
'
)}
`
}
/>
}
contentHeight
=
{
46
}
>
...
...
@@ -451,15 +455,11 @@ export default class Analysis extends Component {
<
Pie
hasLegend
subTitle
=
"
销售额
"
total
=
{()
=>
(
<
span
dangerouslySetInnerHTML
=
{{
__html
:
yuan
(
salesPieData
.
reduce
((
pre
,
now
)
=>
now
.
y
+
pre
,
0
)),
}}
/
>
)}
total
=
{
()
=>
<
Yuan
>
{
salesPieData
.
reduce
((
pre
,
now
)
=>
now
.
y
+
pre
,
0
)}
<
/Yuan
>
}
data
=
{
salesPieData
}
valueFormat
=
{
val
=>
<
span
dangerouslySetInnerHTML
=
{{
__html
:
yuan
(
val
)
}}
/
>
}
valueFormat
=
{
val
ue
=>
<
Yuan
>
{
value
}
<
/Yuan
>
}
height
=
{
248
}
lineWidth
=
{
4
}
/
>
...
...
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