问题遇到的现象和发生背景
Vue中在使用element设置表格隔行变色时,不起效果
tableRowClassName ({ row, rowIndex }) {
if ((rowIndex + 1) % 2 === 0) {
return "background-color:#ebf1fb";
} else {
return "background-color:blue";
}
},
问题相关代码,请勿粘贴截图
运行结果及报错内容
不生效
我的解答思路和尝试过的方法
我想要达到的结果
表格隔行变色