vue:进入页面自动滚动相应位置

mounted() {
  this.$nextTick(() => {
      setTimeout(() => {
        window.scrollTo({ top: 657, behavior: "smooth" })
      }, 200)
    })
  },

// top滚动位置

猜你喜欢

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