Skip to content

Commit

Permalink
fix: 完成初始导航后再触发重新匹配
Browse files Browse the repository at this point in the history
  • Loading branch information
lb1129 committed Aug 10, 2023
1 parent 617780d commit facdf7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ watch(menuDataStore, () => {
name: 'NotFound',
component: lazyLoad('sundry', 'NotFound')
})
router.replace(router.currentRoute.value.fullPath)
// 完成初始导航后 触发重新匹配
router.isReady().then(() => {
router.replace(router.currentRoute.value.fullPath)
})
}
})
</script>
Expand Down

0 comments on commit facdf7a

Please sign in to comment.