First look at the problematic styles:
Solution:
// 解决左右 对不齐 的情况
// el-table 左右有列固定时,fixed为left和right时,行未对齐解决办法
// * 产生原因: el-table底部有滚动条,固定列底部没有滚动条
// * 解决办法: 在el-table的表格中设置padding-bottom的内边距跟滚动条等高
/deep/.el-table__fixed,
/deep/.el-table__fixed-left,
/deep/.el-table__fixed-right {
// 10 是我这里全局定义的滚动条的高度
height: calc(100% - 10px) !important;
}
/deep/.el-table__fixed-body-wrapper {
height: 100% !important;
}
/deep/.el-table__fixed-body-wrapper .el-table__body {
/*滚动条高度*/
// 10 是我这里全局定义的滚动条的高度
padding-bottom: 10px !important;
}
el-table When there are fixed columns on the left and right, and fixed is left and right, the rows are not aligned. Solution
- Cause : There is a scroll bar at the bottom of the el-table, but there is no scroll bar at the bottom of the fixed column.
- Solution : In the el-table table, set the padding-bottom padding to the same height as the scroll bar.
Reference:
el-table setting fixed causes row confusion problem