mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
update: Use path by default or Page.key
This commit is contained in:
parent
1f6d89b2e9
commit
e80a77782a
@ -29,7 +29,11 @@ export default {
|
||||
if (typeof this.nuxtChildKey !== 'undefined' || this.$route.matched.length > 1) {
|
||||
return this.nuxtChildKey || compile(this.$route.matched[0].path)(this.$route.params)
|
||||
}
|
||||
return this.$route.fullPath.split('#')[0]
|
||||
const Component = this.$route.matched[0].components.default
|
||||
if (Component && Component.options && Component.options.key) {
|
||||
return (typeof Component.options.key === 'function' ? Component.options.key(this.$route) : Component.options.key)
|
||||
}
|
||||
return this.$route.path
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
Loading…
Reference in New Issue
Block a user