|
|
@@ -382,7 +382,12 @@ onActivated(() => {
|
|
|
|
|
|
.sticky-head-table :deep(.el-table__header-wrapper) {
|
|
|
position: sticky;
|
|
|
- top: 0;
|
|
|
+ /* .layout-parent 有 padding:5px,而 sticky 的偏移基准是 padding box。
|
|
|
+ * 若取 top:0,表头会停在 padding 内边缘,上方留出 5px 缝隙,
|
|
|
+ * 滚动中的数据行会从该缝隙穿帮(实测可见单元格文字)。
|
|
|
+ * 上移 5px 让表头吸附到容器 border 边缘,正好盖住该带。
|
|
|
+ * 此值与 app.scss 中 .layout-parent 的 padding 绑定,padding 变更时需同步。 */
|
|
|
+ top: -5px;
|
|
|
/* 高于固定列(z-index:2)与滚动条(z-index:3) */
|
|
|
z-index: 5;
|
|
|
background-color: var(--el-table-header-bg-color);
|