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