首页 |  我的博客 |  查看该博主内容分类 | 

el-table的header-row-class-name或者row-class-name不生效的解决办法?

思路

如果使用的node脚手架,你的style标签长这样:<style scoped></style>,那么只需要在给header-row-class-name或者row-class-name指定的css类上做个样式穿透。

解决办法

如:

<el-table
	row-class-name="table-row-class"
></el-table>
<style scoped>
	/deep/.table-row-class{
		color: red;
	}
</style>
posted @ 2023-05-18 10:18  Z哎呀  阅读(2076)  评论(0)    收藏  举报