<Table :columns="columns" :no-data-text="L('NoDatas')" border :data="list" :row-class-name="rowName" @on-row-click="selectChange"
> </Table>
JS:
rowName(row, index) { if (index == this.treeIndex) { return "changeColor"; } } //表格行选中 selectChange(row, index) { this.treeIndex = index; }
Style:
<style>.changeColor td { background-color: rgba(241, 182, 18, 0.918); } </style>
标签:index,vue,表格,changeColor,背景色,选中,row,iview From: https://www.cnblogs.com/QiangQiangDai/p/16965423.html