咏竹莉
where there is a will,there is a way

1. scrollTo 

     scrollTo() 方法可把内容滚动到指定的坐标。

  语法: 

scrollTo(xpos,ypos)

 

  scrollTo0() {
      let bodyWrapper = document.getElementsByClassName(
        "el-table__body-wrapper"
      );
      if (bodyWrapper && bodyWrapper.length > 0) {
        for (let item of bodyWrapper) {
          item.scrollTo(0, 0);
        }
      }
      document.getElementsByClassName("loopControlCon")[0].scrollTo(0, 0);
 },

 

posted on 2021-12-02 18:00  咏竹莉  阅读(444)  评论(0编辑  收藏  举报