Fork me on GitHub

scrollIntoView导致页面上移

scrollIntoView导致页面上移

解决

  this.$nextTick(() => {
        let selectEventDom = document.querySelector(".checkClass");
        selectEventDom.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })
  });
posted @ 2024-08-05 10:53  毛三仙  阅读(21)  评论(0)    收藏  举报