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

Function setup

packages/runtime-core/__tests__/componentSlots.spec.ts:134–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133 const Comp = {
134 setup() {
135 return () => [
136 h(
137 Child,
138 null,
139 createSlots({ _: 2 as any }, [
140 flag1.value
141 ? {
142 name: 'one',
143 fn: () => [h('span')],
144 }
145 : {
146 name: 'two',
147 fn: () => [h('div')],
148 },
149 ]),
150 ),
151 ]
152 },
153 }
154 render(h(Comp), nodeOps.createElement('div'))
155

Callers

nothing calls this directly

Calls 5

createSlotsFunction · 0.90
renderFunction · 0.90
hFunction · 0.85
mountCompFunction · 0.85
createElementMethod · 0.80

Tested by

no test coverage detected