fix(scrollBehavior): emit triggerScroll event after changing layer (#4399)

resolves: #4080
This commit is contained in:
Alexander Lichter 2018-11-24 21:35:43 +00:00 committed by Pooya Parsa
parent 9f274364ce
commit 330301cacf

View File

@ -34,6 +34,14 @@ export default {
props: {
name: '<%= layoutTransition.name %>',
mode: '<%= layoutTransition.mode %>'
},
on: {
beforeEnter(el) {
// Ensure to trigger scroll event after calling scrollBehavior
window.<%= globals.nuxt %>.$nextTick(() => {
window.<%= globals.nuxt %>.$emit('triggerScroll')
})
}
}
}, [ templateEl ])