Vue中style在scope模式下无效
正常情况:(无效情况)
<style lang="scss" scoped>
.el-table__body tr:last-child {
font-weight: bold;
}
</style>
解决方案: 加上 /deep/
<style lang="scss" scoped>
/deep/ .el-table__body tr:last-child {
font-weight: bold;
}
</style>
这样就不会影响全局CSS样式,同时也保证了心仪的显示效果
参考文献:问度娘,哈哈哈