1.
overflow设置为auto后出现滚动条
缺点:无法兼容IE低版本,不过IE已经放弃了,不考虑。
/* 隐藏滚动条 */
.node-detail::-webkit-scrollbar { width: 0 !important }//chrome 和Safari
.node-detail { -ms-overflow-style: none; }//IE 10+
.node-detail { overflow: -moz-scrollbars-none; }//Firefox
/* 隐藏滚动条 */
2.
// ----------修改elementui表格的默认样式-----------
::v-deep .el-table__body-wrapper {
&::-webkit-scrollbar {
// 整个滚动条
width: 0px; // 纵向滚动条的宽度
background: #022278;
border: none;
}
&::-webkit-scrollbar-track {
// 滚动条轨道
border: none;
}
}
// --------------------隐藏table gutter列和内容区右侧的空白 start
::v-deep .el-table th.gutter {
display: none;
width: 0;
}
::v-deep .el-table colgroup col[name='gutter'] {
display: none;
width: 0;
}
::v-deep .el-table__body {
width: 100% !important;
}
// --------------------隐藏table gutter列和内容区右侧的空白 end