1.修改选中当前行的样式
<el-table @selection-change="handleSelectionChange" :row-style="isSelectStyle" ref="tableRef">
</el-table>
isSelectStyle ({
row,
rowIndex
}) {
//对所选行进行样式设置,最终效果就看这里了
if (this.ids.includes(row.id)) {
return {
"background-color": "rgba(185, 221, 249, 0.75)",
};
}
},