方法
通过设置 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数据中的对应项
通过设置 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 定位跳转至指定行
本文链接:https://www.haomeiwen.com/subject/iikcuctx.html
网友评论