当前位置: 首页 > Web前端 > vue.js

透明背景el-table的滚动条及fixed列样式问题

时间:2023-03-31 14:31:52 vue.js

.table-wrapper{@includescrollBar($track-color:null);框大小:边框框;溢出:隐藏;边框:1px实心#fff;边界半径:4px;.table-head{padding:px2rem(5)0!important;颜色:#fff;字体粗细:400;:rgba(204,204,204,0.3)!重要;}.table-row{填充:px2rem(5)0!重要;颜色:#fff;}.el-icon-loading{字体大小:px2rem(30);}//#region重置样式//固定列.el-table.el-table__fixed-right{height:auto!important;底部:5px!important;右:4px!重要;背景色:rgb(1,10,23);border-left:1pxsolidrgba($color:#fff,$alpha:1);}//表中的固定表体.el-table__fixed-right.el-table__fixed-body-wrapper{height:auto!important;底部:5px!important;}//隐藏固定列右侧多余的单元格header.el-table.el-table__fixed-right-patch{显示:无;}//清除固定列的右边框。el-table--border.el-table__cell:last-child{border-right:none!important;}//重置固定列单元格的背景色。el-table__fixed-righttd.el-table__cell{背景色:rgb(1,10,23);}//清除单元格的最外层。el-table.el-table--border{border:none;}//清除单元格的初始填充。el-table.el-table__cell{填充:未设置;}//清除表格底部的边框线,背景透明。el-table::before{宽度:0;}//清除.el-table的背景色th.el-table__cell,.el-tabletr,.el-table,.el-table__expanded-cell{background-color:transparent;}//non-fixedColumnrowhover&Fixedcolumnrowhover.el-table--enable-row-hover.el-table__bodytr:hover>td.el-table__cell,.hover-rowtd.el-table__cell{背景-颜色:#284866!重要的;}//scrollbarcolumnoptimization隐藏tableguttercolumn和contentarea右边的空白.el-tableth.gutter{display:none;宽度:0;}.el-tablecolgroupcol[name='gutter']{显示:无;宽度:0;}//#endregion}透明背景el-table的滚动条和固定列样式问题需要el-table透明背景固定列滚动条处理头疼~基础节点:14.17.3@vue/cli5.0.1vue:2.6.12element-ui:2.15.61。设置好表格的透明背景后,清除表格的下边框线。el-tableth.el-table__cell,.el-tabletr,.el-table,.el-table__expanded-cell{background-color:transparent;}.el-table::before{width:0;}2.列表垂直滚动条出现后,隐藏最右边的空白column.el-tableth.gutter{display:none;width:0;}.el-tablecolgroupcol[name='gutter']{显示:无;宽度:0;}3。添加固定列后,调整固定列的样式。el-table.el-table__fixed-right{height:auto!important;底部:5px!important;右:4px!重要;背景色:rgb(1,10,23);border-left:1pxsolidrgba($color:#fff,$alpha:1);}//table-bodyinthefixedtable.el-table__fixed-right.el-table__fixed-body-wrapper{height:auto!important};bottom:5px!important;}//隐藏固定列标题右侧的额外单元格。el-table.el-table__fixed-right-patch{display:none;}//清除固定列右边框line.el-table--border.el-table__cell:last-child{border-right:none!important;}//重置固定列单元格背景color.el-table__fixed-righttd.el-table__cell{background-color:rgb(1,10,23);}4.Table组件二次包装.table-wrapper{@includescrollBar($track-color:null);框大小:边框框;溢出:隐藏;边框:1px实心#fff;边界半径:4px;.table-head{padding:px2rem(5)0!important;颜色:#fff;字体粗细:400;:rgba(204,204,204,0.3)!重要;}.table-row{填充:px2rem(5)0!重要;颜色:#fff;}.el-icon-loading{字体大小:px2rem(30);}//#region重置样式//固定列.el-table.el-table__fixed-right{height:auto!important;底部:5px!important;右:4px!重要;背景色:rgb(1,10,23);border-left:1pxsolidrgba($color:#fff,$alpha:1);}//表中的固定表体.el-table__fixed-right.el-table__fixed-body-wrapper{height:auto!important;底部:5px!important;}//隐藏固定列右侧多余的单元格header.el-table.el-table__fixed-right-patch{显示:无;}//清除固定列的右边框。el-table--border.el-table__cell:last-child{border-right:none!important;}//重置固定列单元格的背景色。el-table__fixed-righttd.el-table__cell{背景色:rgb(1,10,23);}//清除单元格的最外层。el-table.el-table--border{border:none;}//清除单元格的初始填充。el-table.el-table__cell{填充:未设置;}//清除表格底部的边框线,背景透明。el-table::before{宽度:0;}//清除.el-table的背景色th.el-table__cell,.el-tabletr,.el-table,.el-table__expanded-cell{background-color:transparent;}//non-fixedColumnrowhover&Fixedcolumnrowhover.el-table--enable-row-hover.el-table__bodytr:hover>td.el-table__cell,.hover-rowtd.el-table__cell{背景-颜色:#284866!重要的;}//scrollbarcolumnoptimization隐藏tableguttercolumn和contentarea右边的空白.el-tableth.gutter{display:none;宽度:0;}.el-tablecolgroupcol[name='gutter']{显示:无;宽度:0;}//#endregion}相关链接https://element.eleme.cn/#/zh...