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:
@@ -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="暂无数据" /> }}
|
||||
/>
|
||||
</>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user