/*最外层透明*/
::v-deep .el-table,
::v-deep .el-table__expanded-cell {
background-color: transparent;
}
/* 表格内背景颜色 */
::v-deep .el-table th,
::v-deep .el-table tr,
::v-deep .el-table td {
background-color: transparent;
border: none;
color: rgba(255, 255, 255, 0.6);
}
/deep/.el-table th.el-table__cell > .cell {
color: #ffffff;
}
/deep/.el-table td.el-table__cell,
/deep/.el-table th.el-table__cell.is-leaf {
border: none;
}
/deep/.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
background: none;
}
然后用官网自带方法调样式
:cell-style="cellStyle"
:header-cell-style="{
color: '#FFFFFF',
background: 'rgba(255, 255, 255,.2)',
opacity: 1,
}"
methods:
{
cellStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 == 1) {
return "background:rgba(255, 255, 255, 0.05)";
}}