//设置表头
::v-deep .el-table th.is-leaf {
// border: none;
background: #12437d !important;
height: 60px !important;
font-size: 20px;
font-weight: 400;
color: aliceblue;
border: none !important;
}
//设置表格内容区域背景色为透明色
:deep(.el-table,
.el-table__expanded-cell) {
background-color: transparent;
color: aliceblue;
font-size: large;
font-weight: 400;
}```
//鼠标移动到每行透明色
::v-deep .el-table__row:hover>td {
background-color: transparent !important;
}
//去除table item每行的线
:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
border-bottom: none !important;
}
`//去除table最后一行的线
:deep(.el-table__inner-wrapper::before) {
background-color: transparent;
}``
//给每行设置class类名
const tableRowClassName = ({ rowIndex }) => {
if (rowIndex % 2 === 0) {
return 'yellow'
} else {
return 'orange'
}
}
const headerRowStyle = (args) => {
return {
height: '50px',
backgroundColor: '#03102d'
}
}
// 第二个弹框的table的每行颜色
:deep(.yellow) {
background: transparent !important;
height: 60px;
// border-bottom: 1px solid transparent !important;
}
:deep(.orange) {
height: 60px;
background: #12437d !important;
}
【无标题】element plus table表格的样式
最新推荐文章于 2024-03-27 15:06:04 发布