mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Merge pull request #1022 from silverbackdan/silverbackdan-vue-router-key
Configurable 'key' attribute/property for transitions
This commit is contained in:
commit
f490652d18
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nuxt-error v-if="nuxt.err" :error="nuxt.err"></nuxt-error>
|
<nuxt-error v-if="nuxt.err" :error="nuxt.err"></nuxt-error>
|
||||||
<nuxt-child v-else></nuxt-child>
|
<nuxt-child :key="routerViewKey" v-else></nuxt-child>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -10,6 +10,7 @@ import NuxtError from '<%= components.ErrorPage ? ((components.ErrorPage.include
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'nuxt',
|
name: 'nuxt',
|
||||||
|
props: ['routerViewKey'],
|
||||||
beforeCreate () {
|
beforeCreate () {
|
||||||
Vue.util.defineReactive(this, 'nuxt', this.$root.$options._nuxt)
|
Vue.util.defineReactive(this, 'nuxt', this.$root.$options._nuxt)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user