After adding a route to vue3 router. addRoute(), why is the page menu not updated? #466
Replies: 1 comment
-
this repo is not for questions. Use the channels mentioned at vuejs/router#1564 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
console.log(router.getRoutes()); The number of arrays is increased by 1, and the menu is not updated
`console.log(router.getRoutes()); //This array is 29,
//add route
router.addRoute('xitong2', {
path: '/projectbrowsing/duolianjixitong/xitong2',//
component: () => import('@/views/xitong/systemTabShow.vue'),
name: 'Xitong2',
meta: {
title: t('routers.xtyc'),
query: {
systemId: 'a02'
}
}
})
console.log(router.getRoutes()); //This array is 30,`
Prompt
Note that adding routes does not trigger new navigation. That is, the added route will not be displayed unless a new navigation is triggered
Does triggering a new navigation refer to a page jump or something?
Beta Was this translation helpful? Give feedback.
All reactions