el-table 使用fixed 固定列 但是固定列不会随着Y轴滑动 ,像下面这种
设置以下内容可解决:
.el-table__fixed{
/* 重新设置定位,位置可自己调 */
position: fixed;
margin-top: 44px;
margin-left: 12px;
}
.el-table__row{
background: #d5d5d5;
}
/* 表格内容(不包含表头) */
.el-table__body-wrapper{
height:calc(100% - 60px);
overflow-y: auto;
}
/* 表格内容(不包含表头 固定内容) */
.el-table__fixed-body-wrapper{
height:calc(100% - 20px);
overflow-y: auto;
pointer-events: none;
/* 禁止左侧固定列滑动 */
cursor: default;
}
.highlightColor{
background: #FFFFFF;
}