效果:
el-table的背景颜色是白色的,若想重新设置背景颜色,官方文档并没有给出属性设置,需要直接通过css设置。
效果:1.背景颜色透明 2.去边框 3.字体颜色 4.在每行添加不同颜色圆点
这里直接贴代码:
.regional_table {
margin: auto;
}
.regional_table /deep/ .el-table,
.el-table__expanded-cell {
background-color: transparent;
}
.regional_table /deep/ .el-table th {
background-color: transparent !important;
border-bottom: 1px solid #5078fc;
color: #fefefe;
}
.regional_table /deep/ .el-table tr {
background-color: transparent !important;
}
.regional_table /deep/ .el-table--enable-row-transition .el-table__body td,
/deep/.el-table .cell {
background-color: transparent;
color: rgba(255,255,255,0.7);
border: none;
padding-left: 0 !important;
padding-right: 0 !important;
}
/deep/.el-table th>.cell {
color:rgba(254,254,254,1);
font-weight: 700;
}
.el-table::before {
//去除底部白线
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
/* 表格前的圆点 */
/deep/.el-table td:nth-child(1):before {
content: "";
display: block;
position: absolute;
width: 7px;
height: 7px;
background: #5078fc;
top: 20px;
border-radius: 100%;
}
/deep/.el-table tr:nth-child(1) td:nth-child(1):before {
content: "";
display: block;
position: absolute;
width: 7px;
height: 7px;
background: #fe3548;
top: 20px;
border-radius: 100%;
}
/deep/.el-table tr:nth-child(2) td:nth-child(1):before {
content: "";
display: block;
position: absolute;
width: 7px;
height: 7px;
background: #ffb343;
top: 20px;
border-radius: 100%;
}
/deep/.el-table tr:nth-child(3) td:nth-child(1):before {
content: "";
display: block;
position: absolute;
width: 7px;
height: 7px;
background: #03a9f4;
top: 20px;
border-radius: 100%;
}
/** */