vue:进入页面跳转指定位置

<div class="" ref="nowTopRef"></div>
mounted() {
    this.$nextTick(() => {
      const targetLocation = this.$refs.targetLocation;
      targetLocation.scrollIntoView();
      console.log(targetLocation.scrollIntoView())
    })
 },

猜你喜欢

转载自blog.csdn.net/Ygaidi/article/details/130222519