feat: 开发我的持仓列表

This commit is contained in:
R524809
2026-01-13 16:46:18 +08:00
parent 838a021ce5
commit b7972153cc
29 changed files with 1325 additions and 211 deletions
+83
View File
@@ -0,0 +1,83 @@
import { Card, Row, Col, Statistic } from 'antd';
import { ArrowUpOutlined } from '@ant-design/icons';
import PositionList from './components/PositionList';
import './AssetsPage.css';
const AssetsPage = () => {
// 写死的数据(占位)
const stats = {
totalAssets: 1234567,
totalProfit: 234567,
profitRate: 23.4,
recordDays: 300,
};
return (
<div className="assets-page">
{/* 统计卡片 */}
<Row gutter={[16, 16]} className="stats-row">
<Col xs={24} sm={12} lg={6}>
<Card>
<Statistic
title="总资产"
value={stats.totalAssets}
prefix="¥"
valueStyle={{ color: '#1f2937' }}
/>
<div className="stat-change positive">
<ArrowUpOutlined /> +2.5%
</div>
</Card>
</Col>
<Col xs={24} sm={12} lg={6}>
<Card>
<Statistic
title="累计收益"
value={stats.totalProfit}
prefix="¥"
valueStyle={{ color: '#1f2937' }}
/>
<div className="stat-change positive">
<ArrowUpOutlined /> +{stats.profitRate}%
</div>
</Card>
</Col>
<Col xs={24} sm={12} lg={6}>
<Card>
<Statistic
title="累计收益率"
value={stats.profitRate}
suffix="%"
valueStyle={{ color: '#1f2937' }}
/>
<div className="stat-change positive">
<ArrowUpOutlined /> +2.3%
</div>
</Card>
</Col>
<Col xs={24} sm={12} lg={6}>
<Card>
<Statistic
title="记账时长"
value={stats.recordDays}
suffix="天"
valueStyle={{ color: '#1f2937' }}
/>
</Card>
</Col>
</Row>
{/* 资产趋势图表占位 */}
<Card className="chart-card" title="资产趋势">
<div className="chart-placeholder">
<p>使 ECharts </p>
</div>
</Card>
{/* 持仓列表 */}
<PositionList />
</div>
);
};
export default AssetsPage;