.el-table{
font-size: 12px;
--el-table-header-bg-color: #ebeef2;
color: '#5c5c5e',
}
//vue3.2写法
:deep(.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell) {
background: #f3f7fd;
}
/*去掉表格底部的白线*/
:deep(.el-table__inner-wrapper:before) {
bottom: 0;
height: 0px;
left: 0;
width: 100%;
border: none;
}
<!-- 过去的写法 -->
<style>
::v-deep .parent-selector > .child-selector {
/* ... */
}
</style>
<!-- 推荐的新写法 -->
<style>
:deep(.parent-selector > .child-selector) {
/* ... */
}
</style>
element-plus 表头样式以及隔行样式
于 2024-06-27 19:21:51 首次发布