0
点赞
收藏
分享

微信扫一扫

vue3 路由设置滚动条置顶


const router = createRouter({
history: createWebHistory(),
routes,
// 跳转路由后导航栏置顶
scrollBehavior(to, from, saveScrollPosition) {
return { left: 0, top: 0 };
},
});

举报

相关推荐

0 条评论