MCPcopy Index your code
hub / github.com/ygs-code/vue / simpleNormalizeChildren

Function simpleNormalizeChildren

vue.js:3291–3298  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

3289
3290 //循环子节点children,把他连在一起,其实就是把伪数组变成真正的数组
3291 function simpleNormalizeChildren(children) {
3292 for (var i = 0; i < children.length; i++) {
3293 if (Array.isArray(children[i])) {
3294 return Array.prototype.concat.apply([], children)
3295 }
3296 }
3297 return children
3298 }
3299
3300 // 2. When the children contains constructs that always generated nested Arrays, 2。当子类包含总是生成嵌套数组的结构时,
3301 // e.g. <template>, <slot>, v-for, or when the children is provided by user 例如,模板缝隙><>、<V时,或当孩子由用户提供

Callers 1

_createElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected