html
<el-table :data="tableDate" :row-class-name="rowClassName">
</el-table>
js
rowClass({ row, column, rowIndex, columnIndex }) {
// console.log(row, column, rowIndex, columnIndex);
if (row.khxmc == '总分') {
return 'fixed-row'
}
},
css
.el-table__body {
.fixed-row {
position: sticky;
bottom: 0;
width: 100%;
height: 60px;
td {
border: 1px solid #fff;
box-shadow: 2px -2px 3px 0px #ddd;
}
}
}
效果