<div class="table-wrap">
<Table class="table" border :columns="column" :loading="loading" :data="tableData" no-data-text="暂无数据" :height="tableHeight" disabled-hover highlight-row>
</Table>
</div>
highlightCurrentRow(index) {
if (index > -1) {
this.$refs.table.highlightCurrentRow(index);
this.$nextTick(() => {
let tableList = document.querySelectorAll(".table-wrap .ivu-table-body");
let tableCell = document.querySelector('.table-wrap .ivu-table-tbody .ivu-table-row-highlight');
for (let item of tableList) {
try {
item.scroll(0, tableCell.offsetTop - tableCell.offsetHeight);
} catch(e) {}
}
});
} else {
this.$refs.table.clearCurrentRow();
}
}