From 43a828a2c62c12b1e420e9e17107ff9440b18ec3 Mon Sep 17 00:00:00 2001 From: cloud370 Date: Wed, 24 Sep 2025 05:36:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BD=93=E9=AA=8C=E5=92=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增每页数量localStorage缓存,刷新后保持用户选择 - 增加表格显示高度从600px到800px,显示更多数据 - 支持点击表格行进行选择,提升操作便利性 - 格式化创建时间显示为详细时间(年/月/日 时:分) - 优化复选框和操作按钮的点击事件冲突 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- components/accounts/account-table.tsx | 22 +++++++++++----- lib/hooks/use-accounts.ts | 36 +++++++++++++++++++-------- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/components/accounts/account-table.tsx b/components/accounts/account-table.tsx index 94ee9e5..8eea727 100644 --- a/components/accounts/account-table.tsx +++ b/components/accounts/account-table.tsx @@ -134,8 +134,8 @@ export function AccountTable({ {/* 分页器 - 移到顶部 */} {renderPagination()} - {/* 表格区域 - 直接使用原生table确保sticky正常工作 */} -
+ {/* 表格区域 - 增加高度以显示更多数据 */} +
@@ -170,8 +170,12 @@ export function AccountTable({ ) : ( accounts.map((account) => ( - - onSelectOne(account.id, !selectedIds.includes(account.id))} + > + -
+
e.stopPropagation()}> onSelectOne(account.id, checked as boolean)} @@ -184,9 +188,15 @@ export function AccountTable({ {getStatusBadge(account.status)} {account.notes || '-'} - {new Date(account.createdAt).toLocaleDateString('zh-CN')} + {new Date(account.createdAt).toLocaleString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit' + })} + e.stopPropagation()}>
{onView && (