<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>

 

posted on 2022-12-08 10:30  我炒菜不放盐  阅读(500)  评论(0编辑  收藏  举报