mirror of https://github.com/vuejs/vue.git
more robust parent transition skip check
This commit is contained in:
parent
7b4a5a14e3
commit
f764db4b01
|
|
@ -54,6 +54,14 @@ function placeholder (h, rawChild) {
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasParentTransition (vnode) {
|
||||||
|
while ((vnode = vnode.parent)) {
|
||||||
|
if (vnode.data.transition) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'transition',
|
name: 'transition',
|
||||||
props: transitionProps,
|
props: transitionProps,
|
||||||
|
|
@ -95,7 +103,7 @@ export default {
|
||||||
|
|
||||||
// if this is a component root node and the component's
|
// if this is a component root node and the component's
|
||||||
// parent container node also has transition, skip.
|
// parent container node also has transition, skip.
|
||||||
if (this.$vnode.parent && this.$vnode.parent.data.transition) {
|
if (hasParentTransition(this.$vnode)) {
|
||||||
return rawChild
|
return rawChild
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue