Files
makemd/dashboard/src/pages/index.tsx

120 lines
3.7 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { Card, Typography, Row, Col, Statistic, Divider } from 'antd';
import {
ShoppingOutlined,
FileTextOutlined,
ShopOutlined,
DollarOutlined,
RiseOutlined,
FallOutlined,
} from '@ant-design/icons';
const { Title, Text } = Typography;
const Dashboard: React.FC = () => {
return (
<div>
<Title level={4}></Title>
<Text type="secondary"></Text>
<Divider />
{/* 核心指标卡片 */}
<Row gutter={[16, 16]}>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="商品数量"
value={1280}
prefix={<ShoppingOutlined style={{ color: '#1890ff' }} />}
valueStyle={{ color: '#1890ff' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="success">
<RiseOutlined /> +12
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="订单数量"
value={960}
prefix={<FileTextOutlined style={{ color: '#52c41a' }} />}
valueStyle={{ color: '#52c41a' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="success">
<RiseOutlined /> +8%
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="商户数量"
value={120}
prefix={<ShopOutlined style={{ color: '#722ed1' }} />}
valueStyle={{ color: '#722ed1' }}
/>
<div style={{ marginTop: 8 }}>
<Text type="secondary">
98
</Text>
</div>
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card hoverable>
<Statistic
title="总销售额"
value={1280000}
prefix={<DollarOutlined style={{ color: '#fa8c16' }} />}
valueStyle={{ color: '#fa8c16' }}
precision={2}
/>
<div style={{ marginTop: 8 }}>
<Text type="danger">
<FallOutlined /> -2%
</Text>
</div>
</Card>
</Col>
</Row>
{/* 系统功能介绍 */}
<Row gutter={[16, 16]} style={{ marginTop: 24 }}>
<Col span={24}>
<Card title="系统功能">
<Text>
使 Crawlful Hub
</Text>
<Divider />
<Row gutter={[16, 16]}>
<Col xs={24} md={8}>
<Card type="inner" title="商品管理">
<Text></Text>
</Card>
</Col>
<Col xs={24} md={8}>
<Card type="inner" title="订单管理">
<Text></Text>
</Card>
</Col>
<Col xs={24} md={8}>
<Card type="inner" title="数据分析">
<Text></Text>
</Card>
</Col>
</Row>
</Card>
</Col>
</Row>
</div>
);
};
export default Dashboard;