MCPcopy
hub / github.com/vuejs/core / setupBlock

Function setupBlock

packages/runtime-core/src/vnode.ts:324–336  ·  view source on GitHub ↗
(vnode: VNode)

Source from the content-addressed store, hash-verified

322}
323
324function setupBlock(vnode: VNode) {
325 // save current block children on the block vnode
326 vnode.dynamicChildren =
327 isBlockTreeEnabled > 0 ? currentBlock || (EMPTY_ARR as any) : null
328 // close block
329 closeBlock()
330 // a block is always going to be patched, so track it as a child of its
331 // parent block
332 if (isBlockTreeEnabled > 0 && currentBlock) {
333 currentBlock.push(vnode)
334 }
335 return vnode
336}
337
338/**
339 * @private

Callers 2

createElementBlockFunction · 0.85
createBlockFunction · 0.85

Calls 2

closeBlockFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected