mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Add appear transition on spa mode
This commit is contained in:
parent
1507061138
commit
6461bcc9cb
@ -3,16 +3,20 @@ import Vue from 'vue'
|
||||
const transitionsKeys = [
|
||||
'name',
|
||||
'mode',
|
||||
'appear',
|
||||
'css',
|
||||
'type',
|
||||
'duration',
|
||||
'enterClass',
|
||||
'leaveClass',
|
||||
'appearClass',
|
||||
'enterActiveClass',
|
||||
'enterActiveClass',
|
||||
'leaveActiveClass',
|
||||
'appearActiveClass',
|
||||
'enterToClass',
|
||||
'leaveToClass'
|
||||
'leaveToClass',
|
||||
'appearToClass'
|
||||
]
|
||||
const listenersKeys = [
|
||||
'beforeEnter',
|
||||
@ -22,7 +26,11 @@ const listenersKeys = [
|
||||
'beforeLeave',
|
||||
'leave',
|
||||
'afterLeave',
|
||||
'leaveCancelled'
|
||||
'leaveCancelled',
|
||||
'beforeAppear',
|
||||
'appear',
|
||||
'afterAppear',
|
||||
'appearCancelled'
|
||||
]
|
||||
|
||||
export default {
|
||||
|
@ -133,6 +133,11 @@ Options.from = function (_options) {
|
||||
// Apply mode
|
||||
_.defaultsDeep(options, mode)
|
||||
|
||||
// If no server-side rendering, add appear true transition
|
||||
if (options.render.ssr === false) {
|
||||
options.transition.appear = true
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
@ -239,7 +244,8 @@ Options.defaults = {
|
||||
loadingIndicator: {},
|
||||
transition: {
|
||||
name: 'page',
|
||||
mode: 'out-in'
|
||||
mode: 'out-in',
|
||||
appear: false
|
||||
},
|
||||
router: {
|
||||
mode: 'history',
|
||||
|
Loading…
Reference in New Issue
Block a user