forked from opentiny/tiny-vue
fix(nav-menu): [nav-menu] resolve the issue of current component not being highlighted (#1695)
This commit is contained in:
parent
6b4801cf2e
commit
66f4d2153d
|
@ -215,7 +215,7 @@ export const mounted =
|
|||
|
||||
if (router) {
|
||||
state.afterEach = () => {
|
||||
api.setActiveMenu(api.getSelectedIndex(route.path))
|
||||
api.setActiveMenu(api.getSelectedIndex(router.currentRoute.path))
|
||||
}
|
||||
|
||||
router.afterEach(state.afterEach)
|
||||
|
|
Loading…
Reference in New Issue