子级呈现不同颜色去区分

tips: 我这里使用的vue3 + elementplus
...
function tableRowClassName({ row, rowIndex }) {
if (row.children.length === 0) {
return 'success-row';
}
return '';
}
去掉style中的scoped即可,哈哈哈 ^_^ ^_^ ^_^
快去动动自己的小手手操作起来看看效果吧,冲冲冲!!!