🐛 fix(sql-audit): 修复固定操作列悬停内容穿透

- 覆盖审计表格固定操作列的不透明背景
- 使用不透明混合色保留行悬停反馈
- 增加固定列内容穿透回归测试
This commit is contained in:
Syngnat
2026-07-12 16:28:17 +08:00
parent 7c8e8d8dd3
commit 4d90ed776f
2 changed files with 19 additions and 0 deletions

View File

@@ -170,6 +170,14 @@
padding-block: 9px;
}
.gn-sql-audit-table-panel .ant-table-cell-fix-right {
background: var(--sql-audit-panel);
}
.gn-sql-audit-workbench .gn-sql-audit-table-panel .ant-table-tbody > tr:hover > td {
background: color-mix(in srgb, var(--sql-audit-text) 4.5%, var(--sql-audit-panel)) !important;
}
.gn-sql-audit-table-row td {
height: 44px;
font-variant-numeric: tabular-nums;

View File

@@ -54,6 +54,17 @@ describe('SqlAuditWorkbench', () => {
expect(styleSource).toMatch(/\.gn-sql-audit-table-panel\s*\{[\s\S]*?min-height:\s*280px;/);
});
it('keeps the fixed action column opaque while rows are hovered', () => {
const styleSource = readFileSync(new URL('./SqlAuditWorkbench.css', import.meta.url), 'utf8');
expect(styleSource).toMatch(
/\.gn-sql-audit-table-panel\s+\.ant-table-cell-fix-right[\s\S]*?background:\s*var\(--sql-audit-panel\)/,
);
expect(styleSource).toMatch(
/\.gn-sql-audit-workbench\s+\.gn-sql-audit-table-panel[\s\S]*?tr:hover\s*>\s*td[\s\S]*?background:\s*color-mix\(in srgb, var\(--sql-audit-text\) 4\.5%, var\(--sql-audit-panel\)\)\s*!important/,
);
});
it('debounces only free-text search before querying SQLite', () => {
const source = readFileSync(new URL('./SqlAuditWorkbench.tsx', import.meta.url), 'utf8');