el-table 定位跳转至指定行

方法

通过设置 this.$refs.elTable.bodyWrapper.scrollTop 的 scrollTop 来实现。

示例代码
this.$refs.elTable.bodyWrapper.scrollTop = this.$refs.elTable.bodyWrapper.scrollHeight
this.$refs.elTable.setCurrentRow(item)
注:elTable为el-table对应的ref属性;item为el-table数据中的对应项

你可能感兴趣的:(el-table 定位跳转至指定行)