问题描述:
vue中使用了scrollIntoView但是点击元素之后虽然能实现定位到指定位置,但是页面整体上移了。
解决:
this.$nextTick(() => {
let selectEventDom = document.querySelector(".checkClass");
selectEventDom.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })
});