fix: re-apply UX fixes on Bills, Expenses, Deposits

- Add Empty component to antd imports
- Replace console.error with message.error in catch blocks
- Add batchLoading state + guard on batch operations
- Add locale emptyText to Tables
This commit is contained in:
2026-07-09 19:57:10 +08:00
parent 8f28c172c4
commit 97c2ceccde
3 changed files with 14 additions and 14 deletions

View File

@@ -88,7 +88,7 @@ const DepositsPage: React.FC = () => {
const res = await api.get<PendingRefund[]>('/deposits/pending-refunds');
setPendingRefunds(res || []);
} catch (e: any) {
message.error(e?.message || '加载待退款列表失败');
message.error(e?.message || '加载失败,请稍后重试');
}
setPendingLoading(false);
};
@@ -437,9 +437,9 @@ const DepositsPage: React.FC = () => {
dataSource={filteredData}
rowKey="id"
loading={loading}
locale={{ emptyText: <Empty description="暂无数据" /> }}
scroll={{ x: 1200 }}
pagination={{ pageSize: 15, showTotal: (total) => `${total}` }}
locale={{ emptyText: <Empty description="暂无数据" /> }}
/>
</>
),