feat(transition): properly handle transition & transition-group in compiler

This commit is contained in:
Evan You
2019-11-29 12:42:04 -05:00
parent 4e8d57bdfb
commit 0e3e07079a
7 changed files with 77 additions and 40 deletions

View File

@@ -95,6 +95,11 @@ export const TransitionGroup = {
prevChildren = children
children = slots.default ? slots.default() : []
// handle fragment children case, e.g. v-for
if (children.length === 1 && children[0].type === Fragment) {
children = children[0].children as VNode[]
}
for (let i = 0; i < children.length; i++) {
const child = children[i]
if (child.key != null) {