fix lifecycle in unkeyed child of recycled keyed
This commit is contained in:
parent
8feb6d3b39
commit
0d9a51fe37
3 changed files with 32 additions and 5 deletions
|
|
@ -141,14 +141,14 @@ module.exports = function($window) {
|
|||
if (old[i] === vnodes[i]) continue
|
||||
else if (old[i] == null && vnodes[i] != null) createNode(parent, vnodes[i], hooks, ns, getNextSibling(old, i + 1, nextSibling))
|
||||
else if (vnodes[i] == null) removeNodes(old, i, i + 1, vnodes)
|
||||
else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), false, ns)
|
||||
else updateNode(parent, old[i], vnodes[i], hooks, getNextSibling(old, i + 1, nextSibling), recycling, ns)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
recycling = recycling || isRecyclable(old, vnodes)
|
||||
if (recycling) old = old.concat(old.pool)
|
||||
|
||||
|
||||
var oldStart = 0, start = 0, oldEnd = old.length - 1, end = vnodes.length - 1, map
|
||||
while (oldEnd >= oldStart && end >= start) {
|
||||
var o = old[oldStart], v = vnodes[start]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue