需求:隐藏表格右边的滚动条
<el-table :data="tableData" border height="100%" style="width: 100%;">
::v-deep .el-table {
.el-table__body-wrapper {
&::-webkit-scrollbar {
// 整个滚动条
width: 0; // 纵向滚动条的宽度
background: rgba(213, 215, 220, 0.3);
border: none;
}
&::-webkit-scrollbar-track {
// 滚动条轨道
border: none;
}
}
// --------------------隐藏table gutter列和内容区右侧的空白
th.gutter {
display: none !important;
width: 0 !important
}
colgroup col[name='gutter'] {
display: none;
width: 0;
}
.el-table__body {
width: 100% !important;
}
}