原因:层级问题,左侧固定列层级高,滚动条层级低,提升一下滚动条层级即可
注意要在全局样式中定义类 fixed-scrool-error 样式
.fixed-scroll-error {
.el-table--scrollable-x .el-table__body-wrapper {
z-index: 2;
}
}
运用:直接在有问题的表格最外层 标签中使用 fixed-scroll-error 即可
<template>
<div class="fixed-scroll-error">
<el-table>
</el-table>
</div>
</template>
本文介绍了一种解决Element UI表格中滚动条被左侧固定列遮挡的问题的方法。通过调整CSS层级,确保滚动条始终可见。只需在出现问题的表格外层应用fixed-scroll-error类。
3404






