Match-id-67aaa5dc60626cae48a748947e0d7cc5c0119464

This commit is contained in:
* 2022-02-18 17:55:14 +08:00 committed by *
parent 0dd4f6e5dd
commit 2b8df313ae
1 changed files with 2 additions and 6 deletions

View File

@ -209,11 +209,6 @@ function getOldNodeFromMap(nodeMap: Map<string | number, VNode>, newIdx: number,
return null; return null;
} }
function setCIndex(vNode: VNode, idx: number) {
vNode.cIndex = idx;
updateVNodePath(vNode);
}
// diff数组类型的节点核心算法 // diff数组类型的节点核心算法
function diffArrayNodesHandler( function diffArrayNodesHandler(
parentNode: VNode, parentNode: VNode,
@ -274,7 +269,8 @@ function diffArrayNodesHandler(
theLastPosition = setVNodeAdditionFlag(newNode, theLastPosition, isComparing); theLastPosition = setVNodeAdditionFlag(newNode, theLastPosition, isComparing);
newNode.eIndex = leftIdx; newNode.eIndex = leftIdx;
setCIndex(newNode, leftIdx); newNode.cIndex = leftIdx;
updateVNodePath(newNode);
appendNode(newNode); appendNode(newNode);
oldNode = nextOldNode; oldNode = nextOldNode;
} }