From f77d30a4e67734ee5bf2bb00dcbe7e4ca0c3f1f8 Mon Sep 17 00:00:00 2001 From: seaislee1209 Date: Tue, 12 May 2026 21:08:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20=E7=BF=BB=E9=A1=B5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=94=B9=20sticky=20=E8=B4=B4=E5=BA=95=20=E2=80=94=20?= =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E5=B0=8F=E5=B1=8F=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E6=BB=9A=E5=88=B0=E5=BA=95=E5=B0=B1=E8=83=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.20.1 §I 只修了"能滚到能点到",用户期望是"始终可见不用滚"。 4 个 admin 管理页 .pagination 改 position: sticky + bottom: 0 + 背景遮挡, 翻页按钮固定在 .content 滚动容器视口底部,内容长度无关。 z-index: 10 确保 sticky 时压在表格行之上;background var(--color-bg-page) 覆盖透视下方内容(浅/深主题各自适应)。 涉及 4 个 page CSS:RecordsPage / UsersPage / LoginRecordsPage / AuditLogsPage Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/pages/AuditLogsPage.module.css | 10 +++++++++- web/src/pages/LoginRecordsPage.module.css | 10 +++++++++- web/src/pages/RecordsPage.module.css | 10 +++++++++- web/src/pages/UsersPage.module.css | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/web/src/pages/AuditLogsPage.module.css b/web/src/pages/AuditLogsPage.module.css index aa517fc..1ffd56f 100644 --- a/web/src/pages/AuditLogsPage.module.css +++ b/web/src/pages/AuditLogsPage.module.css @@ -43,7 +43,15 @@ .skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } -.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-bottom: 8px; } +.pagination { + display: flex; justify-content: space-between; align-items: center; + /* sticky 贴底:翻页按钮始终可见 */ + position: sticky; bottom: 0; + margin-top: 16px; + padding: 8px 0 8px; + background: var(--color-bg-page); + z-index: 10; +} .pageInfo { color: var(--color-text-secondary); font-size: 13px; } .pageButtons { display: flex; gap: 4px; } .pageButtons button { diff --git a/web/src/pages/LoginRecordsPage.module.css b/web/src/pages/LoginRecordsPage.module.css index 2c8b6f3..36eec2f 100644 --- a/web/src/pages/LoginRecordsPage.module.css +++ b/web/src/pages/LoginRecordsPage.module.css @@ -35,7 +35,15 @@ .skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } -.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-bottom: 8px; } +.pagination { + display: flex; justify-content: space-between; align-items: center; + /* sticky 贴底:翻页按钮始终可见 */ + position: sticky; bottom: 0; + margin-top: 16px; + padding: 8px 0 8px; + background: var(--color-bg-page); + z-index: 10; +} .pageInfo { color: var(--color-text-secondary); font-size: 13px; } .pageButtons { display: flex; gap: 4px; } .pageButtons button { diff --git a/web/src/pages/RecordsPage.module.css b/web/src/pages/RecordsPage.module.css index d9670dc..3ac3d80 100644 --- a/web/src/pages/RecordsPage.module.css +++ b/web/src/pages/RecordsPage.module.css @@ -57,7 +57,15 @@ .skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } -.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-bottom: 8px; } +.pagination { + display: flex; justify-content: space-between; align-items: center; + /* sticky 贴底:翻页按钮始终可见,不用滚到最底才能点 */ + position: sticky; bottom: 0; + margin-top: 16px; + padding: 8px 0 8px; + background: var(--color-bg-page); + z-index: 10; +} .pageInfo { color: var(--color-text-secondary); font-size: 13px; } .pageButtons { display: flex; gap: 4px; } .pageButtons button { diff --git a/web/src/pages/UsersPage.module.css b/web/src/pages/UsersPage.module.css index 31817b8..7249d9f 100644 --- a/web/src/pages/UsersPage.module.css +++ b/web/src/pages/UsersPage.module.css @@ -51,7 +51,15 @@ .skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } -.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-bottom: 8px; } +.pagination { + display: flex; justify-content: space-between; align-items: center; + /* sticky 贴底:翻页按钮始终可见 */ + position: sticky; bottom: 0; + margin-top: 16px; + padding: 8px 0 8px; + background: var(--color-bg-page); + z-index: 10; +} .pageInfo { color: var(--color-text-secondary); font-size: 13px; } .pageButtons { display: flex; gap: 4px; } .pageButtons button {