From 8cc66a56934c80cf1393fdbc3545e79008a2a835 Mon Sep 17 00:00:00 2001 From: Guichumo <836061373@qq.com> Date: Sat, 21 Nov 2026 18:56:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=93=8D=E4=BD=9C=E5=AE=A1=E8=AE=A1?= =?UTF-8?q?=E9=A1=B5=E7=AD=9B=E9=80=89/=E5=88=97=E8=A1=A8/=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=90=88=E5=B9=B6=E4=B8=BA=E4=B8=80=E5=BC=A0=E7=99=BD?= =?UTF-8?q?=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 筛选栏与数据列表由两张独立 VCard 合并为同一张白卡, 卡片之间不再留 1rem 灰缝,白色区域连成一体 - 分页条移入卡片内部末尾并铺满整行:白底与上方列表左右对齐, 上下各留 1rem 内边距使文字位置与原先一致,上边缘加 1px #eaecf0 分隔线(同控制台卡片 footer 观感) - 错误提示移至白卡上方并留出 1rem 间距 - 更新 AuditLogList.appearance.spec.ts 为「单张白卡」断言 --- .../src/views/AuditLogList.appearance.spec.ts | 23 ++- .../ui/src/views/AuditLogList.vue | 152 +++++++++--------- 2 files changed, 96 insertions(+), 79 deletions(-) diff --git a/plugin-operation-audit/ui/src/views/AuditLogList.appearance.spec.ts b/plugin-operation-audit/ui/src/views/AuditLogList.appearance.spec.ts index eda96dd..80e8ebf 100644 --- a/plugin-operation-audit/ui/src/views/AuditLogList.appearance.spec.ts +++ b/plugin-operation-audit/ui/src/views/AuditLogList.appearance.spec.ts @@ -4,10 +4,12 @@ import { describe, expect, it } from 'vitest' // 结构性回归测试:不渲染组件,仅检查 SFC 源码中的页面布局样式。 // 操作审计页需保持控制台默认灰底(.audit-page 不自行设置背景色), -// 筛选栏、数据列表以白色卡片呈现,与控制台其他页面观感一致; +// 筛选栏、数据列表、分页条合并为同一张白色卡片:区块之间不留灰缝, +// 分页条白底随卡片铺满整行、与上方列表左右对齐(与控制台其他列表页观感一致); // flex: 1 撑满 main-content 剩余高度,使灰底延伸到页面底部。 -// 分页条两端需向内留白,不贴内容区边缘。 -// 历史上 .audit-page 曾整体铺白导致页面与其他页面观感不一致,本测试防止回归。 +// 历史上 .audit-page 曾整体铺白导致页面与其他页面观感不一致, +// 分页条曾左右各留 1rem 导致白底与上方卡片错位, +// 卡片之间曾留 1rem 间距导致白色断开,本测试防止回归。 const sfc = readFileSync(fileURLToPath(new URL('./AuditLogList.vue', import.meta.url)), 'utf-8') function styleRule(selector: string): string { @@ -24,8 +26,19 @@ describe('AuditLogList 页面外观', () => { expect(rule).not.toMatch(/background\s*:/) }) - it('.audit-pagination 左右向内留白,两端不贴内容区边缘', () => { + it('.audit-body 不设区块间距(筛选/数据/分页之间白色连成一体)', () => { + const rule = styleRule('.audit-body') + expect(rule).not.toMatch(/gap\s*:/) + }) + + it('筛选栏与数据列表合并为同一张 VCard', () => { + expect(sfc.match(/ { const rule = styleRule('.audit-pagination') - expect(rule).toMatch(/padding:\s*0\s+1rem\s+1rem/) + expect(rule).not.toMatch(/padding:\s*0\s+1rem/) + expect(rule).toMatch(/padding:\s*1rem/) + expect(rule).toMatch(/border-top:\s*1px\s+solid\s+#eaecf0/) }) }) diff --git a/plugin-operation-audit/ui/src/views/AuditLogList.vue b/plugin-operation-audit/ui/src/views/AuditLogList.vue index 413988e..2db1dff 100644 --- a/plugin-operation-audit/ui/src/views/AuditLogList.vue +++ b/plugin-operation-audit/ui/src/views/AuditLogList.vue @@ -163,69 +163,71 @@ onMounted(fetchLogs)
- - -
- - - - - - - -
- 查询 - 重置 -
-
-
- + + +
+
+ + + + + + + +
+ 查询 + 重置 +
+
+
+ + +
+ +
- -
- -
@@ -315,7 +317,7 @@ onMounted(fetchLogs) padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; - gap: 1rem; + /* 筛选、数据、分页合并为一张白卡,区块之间不留灰缝 */ } .audit-logo { display: inline-flex; @@ -365,6 +367,8 @@ onMounted(fetchLogs) } .audit-error { --tw-ring-color: transparent; + /* 错误提示位于白卡上方,与卡片留出间距 */ + margin-bottom: 1rem; } .audit-row { cursor: pointer; @@ -406,9 +410,9 @@ onMounted(fetchLogs) .status-ok { color: #0f766e; background: rgba(76, 203, 160, 0.15); } .status-fail { color: var(--audit-red); background: rgba(215, 29, 29, 0.12); } .audit-pagination { - display: flex; - justify-content: center; - /* 左右各留 1rem,与内容区留白呼应 */ - padding: 0 1rem 1rem; + /* 在白卡内铺满整行:白底与上方列表左右对齐;上下各留 1rem, + 文字的垂直位置与原分页条一致;上边缘 1px 分隔线同控制台卡片 footer 观感 */ + padding: 1rem; + border-top: 1px solid #eaecf0; }