fix(transition-group): vue 2 compatible handling of transition-group w/ multiple v-for children

fix #1126
This commit is contained in:
Evan You
2020-06-29 18:15:53 -04:00
parent d32aed0906
commit 86d3972855
2 changed files with 15 additions and 8 deletions

View File

@@ -100,8 +100,7 @@ const TransitionGroupImpl = {
const cssTransitionProps = resolveTransitionProps(rawProps)
const tag = rawProps.tag || Fragment
prevChildren = children
const slotChildren = slots.default ? slots.default() : []
children = getTransitionRawChildren(slotChildren)
children = slots.default ? getTransitionRawChildren(slots.default()) : []
for (let i = 0; i < children.length; i++) {
const child = children[i]
@@ -126,7 +125,7 @@ const TransitionGroupImpl = {
}
}
return createVNode(tag, null, slotChildren)
return createVNode(tag, null, children)
}
}
}