mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
fix: sync iframe router
This commit is contained in:
@@ -82,13 +82,13 @@ function getRoutes() {
|
||||
}
|
||||
|
||||
export const router = createRouter({
|
||||
mode: createWebHashHistory(),
|
||||
history: createWebHashHistory(),
|
||||
routes: getRoutes(),
|
||||
scrollBehavior: (to, from, savedPosition) => savedPosition || { x: 0, y: 0 },
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
if (!router.currentRoute.redirectedFrom) {
|
||||
if (!router.currentRoute.value.redirectedFrom) {
|
||||
nextTick(window.syncPath);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user