mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
31 lines
910 B
JavaScript
31 lines
910 B
JavaScript
export default {
|
|
router: {
|
|
extendRoutes (routes, resolve) {
|
|
const indexIndex = routes.findIndex(route => route.name === 'index')
|
|
let index = routes[indexIndex].children.findIndex(route => route.name === 'index-child-id')
|
|
routes[indexIndex].children[index] = {
|
|
...routes[indexIndex].children[index],
|
|
components: {
|
|
default: routes[indexIndex].children[index].component,
|
|
left: resolve(__dirname, 'components/childLeft.vue')
|
|
},
|
|
chunkNames: {
|
|
left: 'components/childLeft'
|
|
}
|
|
}
|
|
|
|
index = routes.findIndex(route => route.name === 'main')
|
|
routes[index] = {
|
|
...routes[index],
|
|
components: {
|
|
default: routes[index].component,
|
|
top: resolve(__dirname, 'components/mainTop.vue')
|
|
},
|
|
chunkNames: {
|
|
top: 'components/mainTop'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|