scrollIntoView导致页面上移

ProgrammerMao-001 / 2024-08-05 / 原文

scrollIntoView导致页面上移

解决

  this.$nextTick(() => {
        let selectEventDom = document.querySelector(".checkClass");
        selectEventDom.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })
  });