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