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 8030ca1a3d
commit 0c6c69b011

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 ])