使用element-ui做表格很方便,但是样式调整比较麻烦,特意记一下
需要取消组件内样式的scoped,并提高权重,否则无法生效
<style lang="scss">
@import "../../../assets/style/common";
.el-table--border:after,
.el-table--group:after,
.el-table:before {
background-color: $borderColor!important;
}
.el-table--border,
.el-table--group {
border-color: $borderColor!important;
}
.el-table td,
.el-table th.is-leaf {
border-bottom: 1px solid $borderColor!important;
}
.el-table--border th,
.el-table--border th.gutter:last-of-type {
border-bottom: 1px solid $borderColor!important;
}
.el-table--border td,
.el-table--border th {
border-right: 1px solid $borderColor!important;
}
.el-table td, .el-table th.is-leaf {
border-bottom: 1px solid $borderColor!important;
}
.el-table td,.building-top .el-table th.is-leaf {
border-bottom: 1px solid $borderColor!important;
}
</style>