<el-table
@selection-change="getRowDatas" ---->获取当前行的函数
:data="tableData" ---->table表格的数据绑定
:row-style="tablebgc" ---->隔行变色
>
---->隔行变色
tablebgc({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "background-color: rgb(2,54,96)";
} else {
return "background-color: rgb(47,91,127)";
}
},
---->table表格的数据绑定
this.tableData = response.data.rows;
---->获取当前行的函数
getRowDatas(row){
this.row = row;
},