refactor: get routes via getRoutes() function instead of importing router config
This commit is contained in:
parent
1553825719
commit
f67ba1e655
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { RouterView } from 'vue-router'
|
import { RouterView } from 'vue-router'
|
||||||
import { version } from '../package.json'
|
import { version } from '../package.json'
|
||||||
import router from '@/router'
|
|
||||||
|
|
||||||
import ModalDialog from '@/components/ModalDialog.vue'
|
import ModalDialog from '@/components/ModalDialog.vue'
|
||||||
import LocaleSwitcher from '@/components/LocaleSwitcher.vue'
|
import LocaleSwitcher from '@/components/LocaleSwitcher.vue'
|
||||||
|
@ -46,7 +45,7 @@ const close = () => {
|
||||||
|
|
||||||
<SiteNavigation>
|
<SiteNavigation>
|
||||||
<NavigationItem
|
<NavigationItem
|
||||||
v-for="(route, idx) in router.options.routes"
|
v-for="(route, idx) in $router.getRoutes()"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
:icon="route.meta?.icon"
|
:icon="route.meta?.icon"
|
||||||
:href="route.path"
|
:href="route.path"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue