mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Merge pull request #3239 from rockywu/dev
add extendRoutes Support for meta properties
This commit is contained in:
commit
b022d21bd3
@ -10,6 +10,7 @@ import Router from 'vue-router'
|
|||||||
res += tab + '\tpath: ' + JSON.stringify(route.path)
|
res += tab + '\tpath: ' + JSON.stringify(route.path)
|
||||||
res += (route.component) ? ',\n\t' + tab + 'component: ' + (splitChunks.pages ? route._name : `() => ${route._name}.default || ${route._name}`) : ''
|
res += (route.component) ? ',\n\t' + tab + 'component: ' + (splitChunks.pages ? route._name : `() => ${route._name}.default || ${route._name}`) : ''
|
||||||
res += (route.redirect) ? ',\n\t' + tab + 'redirect: ' + JSON.stringify(route.redirect) : ''
|
res += (route.redirect) ? ',\n\t' + tab + 'redirect: ' + JSON.stringify(route.redirect) : ''
|
||||||
|
res += (route.meta) ? ',\n\t' + tab + 'meta: ' + JSON.stringify(route.meta) : ''
|
||||||
res += (route.name) ? ',\n\t' + tab + 'name: ' + JSON.stringify(route.name) : ''
|
res += (route.name) ? ',\n\t' + tab + 'name: ' + JSON.stringify(route.name) : ''
|
||||||
res += (route.children) ? ',\n\t' + tab + 'children: [\n' + recursiveRoutes(routes[i].children, tab + '\t\t', components) + '\n\t' + tab + ']' : ''
|
res += (route.children) ? ',\n\t' + tab + 'children: [\n' + recursiveRoutes(routes[i].children, tab + '\t\t', components) + '\n\t' + tab + ']' : ''
|
||||||
res += '\n' + tab + '}' + (i + 1 === routes.length ? '' : ',\n')
|
res += '\n' + tab + '}' + (i + 1 === routes.length ? '' : ',\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user