33

vxe-table 的表格新增一行怎么自动滚动到底部?api中的scrollTo和scrollToRow都没效果

 2 years ago
source link: https://www.oschina.net/question/3649317_2323152
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vxe-table 的表格新增一行怎么自动滚动到底部?api中的scrollTo和scrollToRow都没效果

寄灬忆 发布于 昨天 18:23

vxe-table 的表格新增一行怎么自动滚动到底部?

api中的scrollTo和scrollToRow都没效果,已经试过了

that.$refs.xTable.clearScroll().then(() => {
       that.scrollDown()
})

scrollDown() {
      const el = this.$refs.xTable.$el.querySelector('.vxe-table--body-wrapper')
      if (el) {
        el.scrollTop = el.scrollHeight
      }
}

这种方式也不行


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK