|
@@ -5797,7 +5797,7 @@ function createPatchFunction (backend) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
|
|
|
|
|
|
|
+ function removeVnodes (vnodes, startIdx, endIdx) {
|
|
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
|
var ch = vnodes[startIdx];
|
|
var ch = vnodes[startIdx];
|
|
|
if (isDef(ch)) {
|
|
if (isDef(ch)) {
|
|
@@ -5908,7 +5908,7 @@ function createPatchFunction (backend) {
|
|
|
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
|
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
|
|
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
|
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
|
|
} else if (newStartIdx > newEndIdx) {
|
|
} else if (newStartIdx > newEndIdx) {
|
|
|
- removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
|
|
|
|
|
|
|
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -5985,7 +5985,7 @@ function createPatchFunction (backend) {
|
|
|
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
|
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
|
|
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
|
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
|
|
} else if (isDef(oldCh)) {
|
|
} else if (isDef(oldCh)) {
|
|
|
- removeVnodes(elm, oldCh, 0, oldCh.length - 1);
|
|
|
|
|
|
|
+ removeVnodes(oldCh, 0, oldCh.length - 1);
|
|
|
} else if (isDef(oldVnode.text)) {
|
|
} else if (isDef(oldVnode.text)) {
|
|
|
nodeOps.setTextContent(elm, '');
|
|
nodeOps.setTextContent(elm, '');
|
|
|
}
|
|
}
|
|
@@ -6216,7 +6216,7 @@ function createPatchFunction (backend) {
|
|
|
|
|
|
|
|
// destroy old node
|
|
// destroy old node
|
|
|
if (isDef(parentElm$1)) {
|
|
if (isDef(parentElm$1)) {
|
|
|
- removeVnodes(parentElm$1, [oldVnode], 0, 0);
|
|
|
|
|
|
|
+ removeVnodes([oldVnode], 0, 0);
|
|
|
} else if (isDef(oldVnode.tag)) {
|
|
} else if (isDef(oldVnode.tag)) {
|
|
|
invokeDestroyHook(oldVnode);
|
|
invokeDestroyHook(oldVnode);
|
|
|
}
|
|
}
|