diff --git a/lib/app/components/nuxt.js b/lib/app/components/nuxt.js index 068b1b16e5..f0bad06587 100644 --- a/lib/app/components/nuxt.js +++ b/lib/app/components/nuxt.js @@ -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: {