美文网首页
el-table 定位跳转至指定行

el-table 定位跳转至指定行

作者: zzzzds | 来源:发表于2019-10-31 10:58 被阅读0次
    方法

    通过设置 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