scrollToRow() {
if (this.currentRowIndex === 0) {
return
}
const index = this.currentRowIndex
this.$nextTick(() => {
const tableBodyWrapper = this.$refs.tableRef.$el.querySelector('.el-table__body-wrapper')
if (tableBodyWrapper) {
const rows = tableBodyWrapper.querySelectorAll('.el-table__row')
if (rows.length > 0) {
const targetRow = rows[index]
this.scrollbar.wrap.scrollTop = targetRow.offsetTop
}
}
})
}