mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Improved default key for page with children
If a route being navigated to from a layout has children, I think this would be a better default key
This commit is contained in:
parent
8563c0f05f
commit
23ebb41353
@ -50,7 +50,7 @@ export default {
|
||||
routerViewKey () {
|
||||
// If nuxtChildKey prop is given or current route has children
|
||||
if (typeof this.nuxtChildKey !== 'undefined' || this.$route.matched.length > 1) {
|
||||
return this.nuxtChildKey || ''
|
||||
return this.nuxtChildKey || this.$route.fullPath.split('/')[1]
|
||||
}
|
||||
return this.$route.fullPath.split('#')[0]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user