2018-12-20 15:50:22 +00:00
|
|
|
export default {
|
|
|
|
router: {
|
2019-07-10 10:45:49 +00:00
|
|
|
extendRoutes (routes, resolve) {
|
2018-12-20 15:50:22 +00:00
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|