MCPcopy Create free account
hub / github.com/ygs-code/vue / createKeyToOldIdx

Function createKeyToOldIdx

vue.js:7913–7923  ·  view source on GitHub ↗
(children, beginIdx, endIdx)

Source from the content-addressed store, hash-verified

7911
7912 // 创建key 如果没有key 则用索引作为key
7913 function createKeyToOldIdx(children, beginIdx, endIdx) {
7914 var i, key;
7915 var map = {};
7916 for (i = beginIdx; i <= endIdx; ++i) {
7917 key = children[i].key;
7918 if (isDef(key)) {
7919 map[key] = i;
7920 }
7921 }
7922 return map
7923 }
7924
7925 //创建虚拟dom
7926 function createPatchFunction(backend) {

Callers 1

updateChildrenFunction · 0.85

Calls 1

isDefFunction · 0.85

Tested by

no test coverage detected