From 6481a3afb23d45cc173fe14b09ecb64303840b4a Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 29 Apr 2018 22:56:50 +0800 Subject: [PATCH] fix danger warning --- src/components/Charts/index.js | 2 +- src/routes/Dashboard/Analysis.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/Charts/index.js b/src/components/Charts/index.js index cacedbce..78863fab 100644 --- a/src/components/Charts/index.js +++ b/src/components/Charts/index.js @@ -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, diff --git a/src/routes/Dashboard/Analysis.js b/src/routes/Dashboard/Analysis.js index 0d2d09b9..5e691e42 100644 --- a/src/routes/Dashboard/Analysis.js +++ b/src/routes/Dashboard/Analysis.js @@ -42,6 +42,10 @@ for (let i = 0; i < 7; i += 1) { }); } +const 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 { } - total={() => } + total={() => 126560} footer={} contentHeight={46} > @@ -451,15 +455,11 @@ export default class Analysis extends Component { ( - now.y + pre, 0)), - }} - /> - )} + total={ + () => {salesPieData.reduce((pre, now) => now.y + pre, 0)} + } data={salesPieData} - valueFormat={val => } + valueFormat={value => {value}} height={248} lineWidth={4} /> -- GitLab