问题:el-table 组件 表头右侧多出一列空白
原因:
所有 el-table-column 都设了宽度,当内容超出高度滚动条出现,表头多出一列滚动条上方的占位
解决:
将 th.gutter 隐藏或将 th.gutter 移动到滚动条上方
/* 隐藏 */
th.gutter {
display: initial;
}
/* 移动 */
th.gutter {
background-color: #f1f1f1;
position: absolute;
height: 100%;
right: 0;
}
/* vue 使用 scoped 需要 /deep/ 深度作用 */
div /deep/ th.gutter {
display: initial;
}