第一步:
点击的时候,把该行的值,赋值到currentRow。
第二步:
highLightRow() {
if (this.currentRow === null) return;
for (const item of this.tableList) {
if (item.ID === this.currentRow.ID) {
this.$refs.archivesTable.setCurrentRow(item);
}}},
第三步:
在更新表格的数据的成功回调函数里面调用hightLightRow()方法就可以了
翻页回到顶部
archivesTable是表格数据
this.$refs.archivesTable.bodyWrapper.scrollTop = 0;