基于ElementUI,设置流体高度时,固定列与底部有间隙

基于ElementUI,设置流体高度时,固定列与底部有间隙问题,如下图:

解决办法:

   1、fixed流体的高度设置为100%

      2、将fixed的滚动内容的最大高度设置为none,bottom为去除滚动条高度的值。

如自定义滚动条的高度为8px,则代码如下:

.el-table{
 .el-table__fixed,
  .el-table__fixed-right {
    height: 100% !important;
  }
  &.el-table--fluid-height {
    &.el-table--scrollable-y{
      .el-table__fixed-body-wrapper{
        bottom:1px;
        max-height: none !important;
      }
      &.el-table--scrollable-x{
        .el-table__fixed-body-wrapper{
          bottom:8px;
          max-height: none !important;
        }
      }
    }
  }
}

  

  

原文地址:https://www.cnblogs.com/karila/p/10972522.html