From 014ad8ce081d65cf4eb9c318218d9b4f7dd82fdd Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 2 Nov 2020 16:21:44 +0800 Subject: [PATCH] U dashboard statistic improve --- spug_web/src/pages/home/StatisticCard.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spug_web/src/pages/home/StatisticCard.js b/spug_web/src/pages/home/StatisticCard.js index 2288eba..78dda48 100644 --- a/spug_web/src/pages/home/StatisticCard.js +++ b/spug_web/src/pages/home/StatisticCard.js @@ -4,7 +4,7 @@ * Released under the AGPL-3.0 License. */ import React from 'react'; -import {Statistic, Card, Row, Col} from 'antd'; +import { Statistic, Card, Row, Col } from 'antd'; import { http } from 'libs'; export default class StatisticCard extends React.Component { @@ -15,6 +15,7 @@ export default class StatisticCard extends React.Component { res: {} } } + componentDidMount() { http.get('/api/home/statistic/') .then(res => this.setState({res})) @@ -27,22 +28,22 @@ export default class StatisticCard extends React.Component { - + {v}} suffix="个"/> - + {v}} suffix="台"/> - + {v}} suffix="个"/> - + {v}} suffix="项"/>