
问题根因 :Element-UI 表格设置 max-height 启用虚拟滚动后, fixed="right" 的操作列在某些情况下会出现背景色透明的渲染问题,这是由于固定列和主表格的渲染不同步导致的。
修复方案 :在样式中添加了针对右侧固定列的背景色强制设置:
<style lang="less" scoped>
::v-deep .el-table tr {
background-color: #fff;
}
::v-deep .el-table__fixed-right {
background-color: #fff;
}
::v-deep .el-table__fixed-right .el-table__row {
background-color: #fff !important;
}
::v-deep .el-table__fixed-right .el-table__cell {
background-color: #fff !important;
}
</style>
