0
点赞
收藏
分享

微信扫一扫

el-table(vue2中)滚动条被固定列盖住

止止_8fc8 2023-10-26 阅读 44

一、项目场景:


二、问题描述

        1、现场图片:

                

        2、全局css环境配置了滚动条高度为6px
/* 全局滚动条配置 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border-radius: 3px;
}
        3、el-table设置滚动条为15px(比全局高9px)
/* el-table滚动条配置 */
.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar {
   height: 15px; 
}


三、原因分析:


四、解决方案:

  .el-table {
    .el-table__fixed-right,
    .el-table__fixed {
      height:auto !important;
      bottom:15px !important;
    }
  }

五、附 自定义滚动条配置

/* 自定义细滚动条 */
::-webkit-scrollbar{width:4px;height:4px;}
::-webkit-scrollbar-button{width:4px;height:10px;}
::-webkit-scrollbar-track{background:0 0;border-radius: 2px}
::-webkit-scrollbar-thumb{background:#cccccc;-webkit-transition:.3s;transition:.3s;border-radius: 4px}
::-webkit-scrollbar-thumb:hover{background-color:#56585c}
::-webkit-scrollbar-thumb:active{background-color:#56585c}
举报

相关推荐

0 条评论