From 2bf02731f2b0b948cefc97560cb73b8b9d03ac67 Mon Sep 17 00:00:00 2001 From: James Homer Date: Sat, 9 Sep 2017 12:12:07 +0100 Subject: [PATCH] fix page transitions --- lib/app/App.vue | 2 +- lib/app/components/nuxt-child.js | 8 ++++---- lib/app/components/nuxt.vue | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/app/App.vue b/lib/app/App.vue index 53806cd92e..771bd613f7 100644 --- a/lib/app/App.vue +++ b/lib/app/App.vue @@ -2,7 +2,7 @@
<% if (loading) { %><% } %> <% if (layoutTransition) { %><% } %> - + <% if (layoutTransition) { %><% } %>
diff --git a/lib/app/components/nuxt-child.js b/lib/app/components/nuxt-child.js index 5e17edbea1..8df1feb71d 100644 --- a/lib/app/components/nuxt-child.js +++ b/lib/app/components/nuxt-child.js @@ -43,9 +43,9 @@ export default { const layoutUid = parent._uid const layoutName = component.options ? component.options.layout : null - // If we're changing layout return the stored vnode + // If we're changing layout render the stored vnode if (nuxt._layoutUid === layoutUid && - nuxt._layoutName !== layoutName) return nuxt._layoutVnode + nuxt._layoutName !== layoutName) return nuxt._childVnode nuxt._layoutUid = layoutUid nuxt._layoutName = layoutName @@ -76,13 +76,13 @@ export default { } }) - nuxt._layoutVnode = h('transition', { + nuxt._childVnode = h('transition', { props: transitionProps, on: listeners }, [ h('router-view', data) ]) - return nuxt._layoutVnode + return nuxt._childVnode } } diff --git a/lib/app/components/nuxt.vue b/lib/app/components/nuxt.vue index 2817b3af9a..2bdd096dd8 100644 --- a/lib/app/components/nuxt.vue +++ b/lib/app/components/nuxt.vue @@ -1,6 +1,8 @@