File tree Expand file tree Collapse file tree 5 files changed +16
-17
lines changed
platforms/web/runtime/components Expand file tree Collapse file tree 5 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,7 @@ declare interface VNodeData {
44
44
staticAttrs ?: { [ key : string ] : string } ;
45
45
hook ?: { [ key : string ] : Function } ;
46
46
on ?: { [ key : string ] : Function | Array < Function > } ;
47
- transition ?: {
48
- definition : String | Object ,
49
- appear : boolean
50
- } ;
47
+ transition ?: string | Object ;
51
48
inlineTemplate ?: {
52
49
render : Function ,
53
50
staticRenderFns : Array < Function >
Original file line number Diff line number Diff line change 1
1
import { callHook } from 'core/instance/lifecycle'
2
+ import { getRealChild } from 'core/vdom/helpers'
2
3
3
4
export default {
4
5
name : 'keep-alive' ,
@@ -30,14 +31,3 @@ export default {
30
31
}
31
32
}
32
33
}
33
-
34
- // in case the child is also an abstract component, e.g. <transition-control>
35
- // we want to recrusively retrieve the real component to be rendered
36
- function getRealChild ( vnode ) {
37
- const compOptions = vnode && vnode . componentOptions
38
- if ( compOptions && compOptions . Ctor . options . _abstract ) {
39
- return getRealChild ( compOptions . propsData . child )
40
- } else {
41
- return vnode
42
- }
43
- }
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function lifecycleMixin (Vue: Class<Component>) {
86
86
vm . $el . __vue__ = vm
87
87
}
88
88
// update parent vnode element after patch
89
- const parentNode = vm . $options . _parentVnode
89
+ const parentNode = vm . $vnode
90
90
if ( parentNode ) {
91
91
parentNode . elm = vm . $el
92
92
// update parent $el if the parent is HOC
Original file line number Diff line number Diff line change @@ -62,6 +62,17 @@ function applyNS (vnode, ns) {
62
62
}
63
63
}
64
64
65
+ // in case the child is also an abstract component, e.g. <transition-control>
66
+ // we want to recrusively retrieve the real component to be rendered
67
+ export function getRealChild ( vnode ) {
68
+ const compOptions = vnode && vnode . componentOptions
69
+ if ( compOptions && compOptions . Ctor . options . _abstract ) {
70
+ return getRealChild ( compOptions . propsData . child )
71
+ } else {
72
+ return vnode
73
+ }
74
+ }
75
+
65
76
export function updateListeners (
66
77
on : Object ,
67
78
oldOn : Object ,
Original file line number Diff line number Diff line change 1
1
/* flow */
2
2
3
3
import { warn } from 'core/util/index'
4
+ import { getRealChild } from 'core/vdom/helpers'
4
5
5
6
export default {
6
7
name : 'transition-control' ,
@@ -20,7 +21,7 @@ export default {
20
21
} ,
21
22
render ( ) {
22
23
const oldChild = this . _vnode
23
- const newChild = this . child
24
+ const newChild = getRealChild ( this . child )
24
25
if ( oldChild && oldChild . data && (
25
26
oldChild . tag !== newChild . tag ||
26
27
oldChild . key !== newChild . key
You can’t perform that action at this time.
0 commit comments