開發情況:
固定table高度時,出現滾動條,我們希望隱藏滾動條,或修改滾動條樣式,出現table右邊出現15px 的固定留白。
代碼示例
<el-table class="controlTable" header-row-class-name="controlHead" :data="statisticList" style="width: 720px;"height="332">
解決方案
方案一:
/deep/ .el-table th.gutter{display: none;width:0
}
/deep/ .el-table colgroup col[name='gutter']{display: none;width: 0;
}
/deep/ .el-table__body{width: 100% !important;
}
方案二:
直接將table內容右邊做配合界面設計的留白,如果是只能貼邊的話,只能選方案一:
.controlTable{padding-right: 20px;
}