antd Vue table 手动改变横向滚动条的位置

在每次请求数据完成之后,设置滚动条位置。

table的ref 名字设置为scrollTable

 this.$nextTick(() => {
            setTimeout(() => {
              this.$refs.scrollTable.$el.querySelector('.ant-table-body').scrollLeft = this.currentMonth * 150
            }, 200)
          })

  

posted @ 2022-07-26 14:46  Mrs.Li&Zhang  阅读(1743)  评论(0编辑  收藏  举报