mounted() {
window.addEventListener('load', () => { // 滚动事件变为 scroll
if (this.$route.path !== '/print') { // /print 表示首页
this.$router.replace('/print') // 切换到首页
}
})
}
vue——刷新页面回首页(包括一些滚动同理)
最新推荐文章于 2024-05-18 11:03:41 发布