mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix route transitions example
This commit is contained in:
parent
d444f2a5b1
commit
bd7c833115
@ -19,6 +19,11 @@
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
// Watch for $route.query.page to call Component methods (asyncData, fetch, validate, layout, etc.)
|
||||
watchQuery: ['page'],
|
||||
// Key for <nuxt-child> (transitions)
|
||||
key: (to) => to.fullPath,
|
||||
// Called to know which transition to apply
|
||||
transition(to, from) {
|
||||
if (!from) return 'slide-left'
|
||||
return +to.query.page < +from.query.page ? 'slide-right' : 'slide-left'
|
||||
|
Loading…
Reference in New Issue
Block a user