Move category filtering to frontend with checkable toggles
This commit is contained in:
+240
-233
@@ -11,14 +11,8 @@ import {
|
||||
PieChart,
|
||||
Pie,
|
||||
Cell,
|
||||
Legend,
|
||||
} from "recharts";
|
||||
import {
|
||||
getOverview,
|
||||
getMonthly,
|
||||
formatAmount,
|
||||
formatDate,
|
||||
} from "../hooks/useApi";
|
||||
import { getOverview, getMonthly, formatAmount } from "../hooks/useApi";
|
||||
|
||||
const COLORS = [
|
||||
"#4f46e5",
|
||||
@@ -35,68 +29,20 @@ const COLORS = [
|
||||
"#e11d48",
|
||||
];
|
||||
|
||||
// 不参与支出饼图的分类(投资/转账/赠与类)
|
||||
const EXCLUDED_PATTERNS = ["投资", "转账", "赠与", "红包"];
|
||||
|
||||
function isExcluded(category) {
|
||||
if (!category) return true;
|
||||
const s = category.trim().toLowerCase();
|
||||
return EXCLUDED_PATTERNS.some(p => s.includes(p.toLowerCase()));
|
||||
}
|
||||
|
||||
/** 将小切片合并为"其他",最多保留 topN-1 个分类 + 1 个"其他" */
|
||||
function buildPieData(categoryStats, topN = 8) {
|
||||
const filtered = (categoryStats || []).filter(
|
||||
(c) => !isExcluded(c.category),
|
||||
);
|
||||
if (filtered.length === 0) return { slices: [], totalAmount: 0 };
|
||||
|
||||
const totalAmount = filtered.reduce((s, c) => s + c.total_amount, 0);
|
||||
if (filtered.length <= topN) return { slices: filtered, totalAmount };
|
||||
|
||||
const top = filtered.slice(0, topN - 1);
|
||||
const rest = filtered.slice(topN - 1);
|
||||
const otherAmount = rest.reduce((s, c) => s + c.total_amount, 0);
|
||||
|
||||
return {
|
||||
slices: [
|
||||
...top,
|
||||
{
|
||||
category: "其他",
|
||||
count: rest.reduce((s, c) => s + c.count, 0),
|
||||
total_amount: otherAmount,
|
||||
},
|
||||
],
|
||||
totalAmount,
|
||||
};
|
||||
}
|
||||
/* ============ 默认不勾的分类 ============ */
|
||||
const DEFAULT_UNCHECKED = ["投资理财", "转账红包"];
|
||||
|
||||
/* ============ 饼图 label ============ */
|
||||
const RADIAN = Math.PI / 180;
|
||||
|
||||
/** 自定义 label:拉出引导线 + 百分比 */
|
||||
function renderPieLabel({
|
||||
cx,
|
||||
cy,
|
||||
midAngle,
|
||||
innerRadius,
|
||||
outerRadius,
|
||||
percent,
|
||||
category,
|
||||
}) {
|
||||
const radius = outerRadius + 30;
|
||||
const x = cx + radius * Math.cos(-midAngle * RADIAN);
|
||||
const y = cy + radius * Math.sin(-midAngle * RADIAN);
|
||||
|
||||
// 引导线起点
|
||||
function renderPieLabel({ cx, cy, midAngle, outerRadius, percent, category }) {
|
||||
const r = outerRadius + 30;
|
||||
const x = cx + r * Math.cos(-midAngle * RADIAN);
|
||||
const y = cy + r * Math.sin(-midAngle * RADIAN);
|
||||
const mx = cx + (outerRadius + 8) * Math.cos(-midAngle * RADIAN);
|
||||
const my = cy + (outerRadius + 8) * Math.sin(-midAngle * RADIAN);
|
||||
// 饼内点
|
||||
const ex = cx + (outerRadius + 2) * Math.cos(-midAngle * RADIAN);
|
||||
const ey = cy + (outerRadius + 2) * Math.sin(-midAngle * RADIAN);
|
||||
|
||||
const pct = (percent * 100).toFixed(0);
|
||||
const textAnchor = x > cx ? "start" : "end";
|
||||
|
||||
const anchor = x > cx ? "start" : "end";
|
||||
return (
|
||||
<>
|
||||
<polyline
|
||||
@@ -108,23 +54,42 @@ function renderPieLabel({
|
||||
<text
|
||||
x={x + (x > cx ? 4 : -4)}
|
||||
y={y}
|
||||
textAnchor={textAnchor}
|
||||
textAnchor={anchor}
|
||||
dominantBaseline="central"
|
||||
fontSize={11}
|
||||
fill="#475569"
|
||||
>
|
||||
<tspan fontWeight={600}>{category}</tspan>
|
||||
<tspan fill="#94a3b8"> {pct}%</tspan>
|
||||
<tspan fill="#94a3b8"> {(percent * 100).toFixed(0)}%</tspan>
|
||||
</text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/* ============ 饼图数据:topN + 其他 ============ */
|
||||
function buildPieData(stats, topN = 7) {
|
||||
const list = stats || [];
|
||||
if (!list.length) return { slices: [], total: 0 };
|
||||
const total = list.reduce((s, c) => s + c.total_amount, 0);
|
||||
if (list.length <= topN) return { slices: list, total };
|
||||
const top = list.slice(0, topN - 1);
|
||||
const rest = list.slice(topN - 1);
|
||||
const other = {
|
||||
category: "其他",
|
||||
count: rest.reduce((s, c) => s + c.count, 0),
|
||||
total_amount: rest.reduce((s, c) => s + c.total_amount, 0),
|
||||
};
|
||||
return { slices: [...top, other], total };
|
||||
}
|
||||
|
||||
export default function Dashboard() {
|
||||
const [overview, setOverview] = useState(null);
|
||||
const [raw, setRaw] = useState(null); // 后端全量
|
||||
const [monthly, setMonthly] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
// 勾选状态:Set<categoryName>
|
||||
const [checked, setChecked] = useState(() => new Set());
|
||||
|
||||
useEffect(() => {
|
||||
loadData();
|
||||
}, []);
|
||||
@@ -132,45 +97,66 @@ export default function Dashboard() {
|
||||
async function loadData() {
|
||||
setLoading(true);
|
||||
try {
|
||||
const [overviewData, monthlyData] = await Promise.all([
|
||||
getOverview(),
|
||||
getMonthly(12),
|
||||
]);
|
||||
setOverview(overviewData);
|
||||
setMonthly(monthlyData);
|
||||
} catch (err) {
|
||||
console.error("加载数据失败:", err);
|
||||
const [ov, mo] = await Promise.all([getOverview(), getMonthly(12)]);
|
||||
setRaw(ov);
|
||||
setMonthly(mo);
|
||||
// 初始化勾选
|
||||
const allCats = new Set(
|
||||
(ov?.categoryBreakdown || []).map((c) => c.category),
|
||||
);
|
||||
for (const c of DEFAULT_UNCHECKED) allCats.delete(c);
|
||||
setChecked(allCats);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
const ov = overview?.overview || {};
|
||||
const { slices: pieData, totalAmount: pieTotal } = useMemo(
|
||||
() => buildPieData(overview?.categoryStats),
|
||||
[overview],
|
||||
);
|
||||
function toggleCat(cat) {
|
||||
setChecked((prev) => {
|
||||
const next = new Set(prev);
|
||||
next.has(cat) ? next.delete(cat) : next.add(cat);
|
||||
return next;
|
||||
});
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
/* ============ 基于勾选计算 ============ */
|
||||
const derived = useMemo(() => {
|
||||
if (!raw) return null;
|
||||
const cb = raw.categoryBreakdown || [];
|
||||
const cs = raw.categoryStats || [];
|
||||
|
||||
// 勾选的分类
|
||||
const sel = cb.filter((c) => checked.has(c.category));
|
||||
const totalIncome = sel.reduce((s, c) => s + c.total_income, 0);
|
||||
const totalExpense = sel.reduce((s, c) => s + c.total_expense, 0);
|
||||
const dealCount = sel.reduce((s, c) => s + c.deal_count, 0);
|
||||
|
||||
// 饼图数据(只取勾选的支出)
|
||||
const pieStats = cs.filter((c) => checked.has(c.category));
|
||||
|
||||
return { sel, totalIncome, totalExpense, dealCount, pieStats };
|
||||
}, [raw, checked]);
|
||||
|
||||
const ov = raw?.overview || {};
|
||||
|
||||
if (loading)
|
||||
return (
|
||||
<div className="loading">
|
||||
<div className="spinner"></div>加载中...
|
||||
<div className="spinner" />
|
||||
加载中...
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
className="page-header"
|
||||
style={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "flex-start",
|
||||
}}
|
||||
style={{ display: "flex", justifyContent: "space-between" }}
|
||||
>
|
||||
<div>
|
||||
<h2>📊 财务仪表盘</h2>
|
||||
<p>全面掌握你的收支情况</p>
|
||||
<p>勾选分类后,所有统计基于选中项计算</p>
|
||||
</div>
|
||||
<button
|
||||
className="btn btn-secondary"
|
||||
@@ -181,46 +167,45 @@ export default function Dashboard() {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Stats Cards */}
|
||||
{/* ========== Stats Cards ========== */}
|
||||
<div className="stats-grid">
|
||||
<div className="stat-card">
|
||||
<div className="stat-label">💰 总收入</div>
|
||||
<div className="stat-value income">
|
||||
{formatAmount(ov.total_income)}
|
||||
{formatAmount(derived?.totalIncome ?? 0)}
|
||||
</div>
|
||||
<div className="stat-sub">所有来源收入合计</div>
|
||||
<div className="stat-sub">{checked.size} 个分类合计</div>
|
||||
</div>
|
||||
<div className="stat-card">
|
||||
<div className="stat-label">💸 总支出</div>
|
||||
<div className="stat-value expense">
|
||||
{formatAmount(ov.total_expense)}
|
||||
{formatAmount(-(derived?.totalExpense ?? 0))}
|
||||
</div>
|
||||
<div className="stat-sub">所有支出合计</div>
|
||||
<div className="stat-sub">{checked.size} 个分类合计</div>
|
||||
</div>
|
||||
<div className="stat-card">
|
||||
<div className="stat-label">📈 净收支</div>
|
||||
<div
|
||||
className={`stat-value ${ov.total_income - ov.total_expense >= 0 ? "income" : "expense"}`}
|
||||
className={`stat-value ${(derived?.totalIncome ?? 0) - (derived?.totalExpense ?? 0) >= 0 ? "income" : "expense"}`}
|
||||
>
|
||||
{formatAmount(ov.total_income - ov.total_expense)}
|
||||
{formatAmount(
|
||||
(derived?.totalIncome ?? 0) - (derived?.totalExpense ?? 0),
|
||||
)}
|
||||
</div>
|
||||
<div className="stat-sub">收入 - 支出</div>
|
||||
</div>
|
||||
<div className="stat-card">
|
||||
<div className="stat-label">📝 交易总数</div>
|
||||
<div className="stat-value primary">{ov.total_count || 0}</div>
|
||||
<div className="stat-sub">
|
||||
共 {ov.matched_count || 0} 笔交易被记录
|
||||
</div>
|
||||
<div className="stat-label">📝 交易笔数</div>
|
||||
<div className="stat-value primary">{derived?.dealCount ?? 0}</div>
|
||||
<div className="stat-sub">共 {ov.matched_count || 0} 条原始记录</div>
|
||||
</div>
|
||||
<div className="stat-card">
|
||||
<div className="stat-label">⚠️ 待确认</div>
|
||||
<div className="stat-value warning">{ov.pending_review || 0}</div>
|
||||
<div className="stat-sub">≥100元 未确认交易</div>
|
||||
<div className="stat-sub">≥100元 未确认</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Charts Row */}
|
||||
{/* ========== Charts Row ========== */}
|
||||
<div
|
||||
style={{
|
||||
display: "grid",
|
||||
@@ -229,7 +214,7 @@ export default function Dashboard() {
|
||||
marginBottom: 24,
|
||||
}}
|
||||
>
|
||||
{/* Monthly Trend */}
|
||||
{/* Monthly */}
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<h3>📅 月度收支趋势</h3>
|
||||
@@ -240,10 +225,7 @@ export default function Dashboard() {
|
||||
<CartesianGrid strokeDasharray="3 3" stroke="#e2e8f0" />
|
||||
<XAxis dataKey="month" tick={{ fontSize: 11 }} />
|
||||
<YAxis tick={{ fontSize: 11 }} />
|
||||
<Tooltip
|
||||
formatter={(value) => formatAmount(value)}
|
||||
labelStyle={{ fontWeight: 600 }}
|
||||
/>
|
||||
<Tooltip formatter={(v) => formatAmount(v)} />
|
||||
<Bar
|
||||
dataKey="income"
|
||||
name="收入"
|
||||
@@ -261,73 +243,76 @@ export default function Dashboard() {
|
||||
) : (
|
||||
<div className="empty-state">
|
||||
<div className="icon">📭</div>
|
||||
<p>暂无数据,请先导入账单</p>
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Category Pie */}
|
||||
{/* Pie */}
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<h3>🏷️ 支出分类占比</h3>
|
||||
{pieData.length > 0 && (
|
||||
<span style={{ fontSize: 13, color: "var(--text-secondary)" }}>
|
||||
合计 {formatAmount(-pieTotal)}
|
||||
</span>
|
||||
)}
|
||||
{(() => {
|
||||
const pd = buildPieData(derived?.pieStats);
|
||||
return pd.total > 0 ? (
|
||||
<span style={{ fontSize: 13, color: "var(--text-secondary)" }}>
|
||||
合计 {formatAmount(-pd.total)}
|
||||
</span>
|
||||
) : null;
|
||||
})()}
|
||||
</div>
|
||||
{pieData.length > 0 ? (
|
||||
<ResponsiveContainer width="100%" height={300}>
|
||||
<PieChart>
|
||||
<Pie
|
||||
data={pieData}
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
innerRadius={50}
|
||||
outerRadius={95}
|
||||
paddingAngle={2}
|
||||
dataKey="total_amount"
|
||||
nameKey="category"
|
||||
label={renderPieLabel}
|
||||
labelLine={false}
|
||||
isAnimationActive={true}
|
||||
>
|
||||
{pieData.map((_, idx) => (
|
||||
<Cell key={idx} fill={COLORS[idx % COLORS.length]} />
|
||||
))}
|
||||
</Pie>
|
||||
<Tooltip
|
||||
formatter={(value) => formatAmount(-value)}
|
||||
labelFormatter={(name) => `分类: ${name}`}
|
||||
/>
|
||||
</PieChart>
|
||||
</ResponsiveContainer>
|
||||
) : overview?.categoryStats?.length > 0 ? (
|
||||
<div className="empty-state" style={{ padding: "40px 0" }}>
|
||||
<div className="icon">📊</div>
|
||||
<p style={{ fontSize: 13, color: "var(--text-secondary)" }}>
|
||||
投资/转账类不参与支出占比统计
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="empty-state" style={{ padding: "40px 0" }}>
|
||||
<div className="icon">📭</div>
|
||||
<p>暂无分类数据,请先对账并 AI 分类</p>
|
||||
</div>
|
||||
)}
|
||||
{(() => {
|
||||
const pd = buildPieData(derived?.pieStats);
|
||||
return pd.slices.length > 0 ? (
|
||||
<ResponsiveContainer width="100%" height={300}>
|
||||
<PieChart>
|
||||
<Pie
|
||||
data={pd.slices}
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
innerRadius={50}
|
||||
outerRadius={95}
|
||||
paddingAngle={2}
|
||||
dataKey="total_amount"
|
||||
nameKey="category"
|
||||
label={renderPieLabel}
|
||||
labelLine={false}
|
||||
isAnimationActive
|
||||
>
|
||||
{pd.slices.map((_, i) => (
|
||||
<Cell key={i} fill={COLORS[i % COLORS.length]} />
|
||||
))}
|
||||
</Pie>
|
||||
<Tooltip
|
||||
formatter={(v) => formatAmount(-v)}
|
||||
labelFormatter={(n) => `分类: ${n}`}
|
||||
/>
|
||||
</PieChart>
|
||||
</ResponsiveContainer>
|
||||
) : (
|
||||
<div className="empty-state" style={{ padding: "40px 0" }}>
|
||||
<div className="icon">📭</div>
|
||||
<p>请勾选至少一个分类</p>
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Category Breakdown Table */}
|
||||
{/* ========== Category Table ========== */}
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<h3>📋 分类收支明细</h3>
|
||||
<span style={{ fontSize: 12, color: "var(--text-secondary)" }}>
|
||||
勾选的行参与上方统计
|
||||
</span>
|
||||
</div>
|
||||
{overview?.categoryBreakdown?.length > 0 ? (
|
||||
{(raw?.categoryBreakdown || []).length > 0 ? (
|
||||
<div className="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ width: 40 }}>勾选</th>
|
||||
<th>分类</th>
|
||||
<th style={{ textAlign: "right" }}>笔数</th>
|
||||
<th style={{ textAlign: "right" }}>收入</th>
|
||||
@@ -338,93 +323,115 @@ export default function Dashboard() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{overview.categoryBreakdown.map((cat, i) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<span className="tag tag-matched">{cat.category}</span>
|
||||
</td>
|
||||
<td style={{ textAlign: "right" }}>{cat.deal_count}</td>
|
||||
<td style={{ textAlign: "right", color: "var(--success)" }}>
|
||||
{cat.total_income > 0
|
||||
? formatAmount(cat.total_income)
|
||||
: "--"}
|
||||
</td>
|
||||
<td style={{ textAlign: "right", color: "var(--danger)" }}>
|
||||
{cat.total_expense > 0
|
||||
? formatAmount(-cat.total_expense)
|
||||
: "--"}
|
||||
</td>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "right",
|
||||
fontWeight: 600,
|
||||
color:
|
||||
cat.total_income - cat.total_expense >= 0
|
||||
? "var(--success)"
|
||||
: "var(--danger)",
|
||||
}}
|
||||
>
|
||||
{formatAmount(cat.total_income - cat.total_expense)}
|
||||
</td>
|
||||
<td style={{ fontSize: 12, maxWidth: 180 }}>
|
||||
{cat.max_income ? (
|
||||
<span
|
||||
title={`${cat.max_income.counterparty || ""} ${cat.max_income.ai_description || ""}`}
|
||||
>
|
||||
<span
|
||||
style={{ color: "var(--success)", fontWeight: 500 }}
|
||||
>
|
||||
{formatAmount(cat.max_income.amount)}
|
||||
{raw.categoryBreakdown.map((cat, i) => {
|
||||
const on = checked.has(cat.category);
|
||||
return (
|
||||
<tr key={i} style={{ opacity: on ? 1 : 0.45 }}>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={on}
|
||||
onChange={() => toggleCat(cat.category)}
|
||||
style={{
|
||||
width: 16,
|
||||
height: 16,
|
||||
cursor: "pointer",
|
||||
accentColor: "var(--primary)",
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<span className="tag tag-matched">{cat.category}</span>
|
||||
</td>
|
||||
<td style={{ textAlign: "right" }}>{cat.deal_count}</td>
|
||||
<td
|
||||
style={{ textAlign: "right", color: "var(--success)" }}
|
||||
>
|
||||
{cat.total_income > 0
|
||||
? formatAmount(cat.total_income)
|
||||
: "--"}
|
||||
</td>
|
||||
<td
|
||||
style={{ textAlign: "right", color: "var(--danger)" }}
|
||||
>
|
||||
{cat.total_expense > 0
|
||||
? formatAmount(-cat.total_expense)
|
||||
: "--"}
|
||||
</td>
|
||||
<td
|
||||
style={{
|
||||
textAlign: "right",
|
||||
fontWeight: 600,
|
||||
color:
|
||||
cat.total_income - cat.total_expense >= 0
|
||||
? "var(--success)"
|
||||
: "var(--danger)",
|
||||
}}
|
||||
>
|
||||
{formatAmount(cat.total_income - cat.total_expense)}
|
||||
</td>
|
||||
<td style={{ fontSize: 12, maxWidth: 180 }}>
|
||||
{cat.max_income ? (
|
||||
<span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--success)",
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
{formatAmount(cat.max_income.amount)}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--text-secondary)",
|
||||
marginLeft: 4,
|
||||
}}
|
||||
>
|
||||
{cat.max_income.counterparty || ""}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--text-secondary)",
|
||||
marginLeft: 4,
|
||||
}}
|
||||
>
|
||||
{cat.max_income.counterparty || ""}
|
||||
) : (
|
||||
<span style={{ color: "var(--text-secondary)" }}>
|
||||
--
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
<span style={{ color: "var(--text-secondary)" }}>
|
||||
--
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
<td style={{ fontSize: 12, maxWidth: 180 }}>
|
||||
{cat.max_expense ? (
|
||||
<span
|
||||
title={`${cat.max_expense.counterparty || ""} ${cat.max_expense.ai_description || ""}`}
|
||||
>
|
||||
<span
|
||||
style={{ color: "var(--danger)", fontWeight: 500 }}
|
||||
>
|
||||
{formatAmount(cat.max_expense.amount)}
|
||||
)}
|
||||
</td>
|
||||
<td style={{ fontSize: 12, maxWidth: 180 }}>
|
||||
{cat.max_expense ? (
|
||||
<span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--danger)",
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
{formatAmount(cat.max_expense.amount)}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--text-secondary)",
|
||||
marginLeft: 4,
|
||||
}}
|
||||
>
|
||||
{cat.max_expense.counterparty || ""}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
color: "var(--text-secondary)",
|
||||
marginLeft: 4,
|
||||
}}
|
||||
>
|
||||
{cat.max_expense.counterparty || ""}
|
||||
) : (
|
||||
<span style={{ color: "var(--text-secondary)" }}>
|
||||
--
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
<span style={{ color: "var(--text-secondary)" }}>
|
||||
--
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
) : (
|
||||
<div className="empty-state">
|
||||
<div className="icon">📭</div>
|
||||
<p>暂无数据,请先导入账单</p>
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user