Use element-ui, if you want to modify the original style of el-table
1. You can customize the class, in order not to affect the global style
<div class="liquidataCase border-padding bg-shadow">
<el-table border :data="tableData" style="width: 100%" highlight-current-row :height="tableHeight">
......
</el-table>
</div>
No scoped in the css style
<style lang="scss">
$wxcolor:#e4c21b;
.wxcolor{color:$wxcolor};
.liquidataCase .el-table tr td:nth-child(3) .cell{
text-align: center;
i{
&:hover{
cursor: pointer;
}
}
}
.liquidataCase .el-select__tags{
flex-wrap: initial !important;
}
</style>
2. If you want to add scoped to the css style, it will take effect if you use /deep/
<style lang="scss" scoped>
$wxcolor:#e4c21b;
.wxcolor{color:$wxcolor};
/deep/.liquidataCase .el-table tr td:nth-child(3) .cell{
text-align: center;
i{
&:hover{
cursor: pointer;
}
}
}
/deep/.liquidataCase .el-select__tags{
flex-wrap: initial !important;
}
</style>
The components will not affect