/** * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug * Copyright (c) * Released under the AGPL-3.0 License. */ import React from 'react'; import { Statistic, Card, Row, Col } from 'antd'; import { http } from 'libs'; export default class StatisticCard extends React.Component { constructor(props) { super(props); this.state = { loading: true, res: {} } } componentDidMount() { http.get('/api/home/statistic/') .then(res => this.setState({res})) .finally(() => this.setState({loading: false})) } render() { const {res, loading} = this.state; return ( 个} formatter={v => {v}}/> 台} formatter={v => {v}}/> 个} formatter={v => {v}}/> 项} formatter={v => {v}}/> ) } }