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

Function setup

packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts:33–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32 const Hello = {
33 setup() {
34 const count = ref(0)
35
36 function inc() {
37 count.value++
38 click()
39 }
40
41 return () =>
42 h(Child, {
43 foo: count.value + 1,
44 id: 'test',
45 class: 'c' + count.value,
46 style: { color: count.value ? 'red' : 'green' },
47 onClick: inc,
48 'data-id': count.value + 1,
49 })
50 },
51 }
52
53 const Child = {

Callers

nothing calls this directly

Calls 7

hFunction · 0.85
openBlockFunction · 0.85
createCommentVNodeFunction · 0.85
createElementBlockFunction · 0.85
refFunction · 0.70
createBlockFunction · 0.50
emitFunction · 0.50

Tested by

no test coverage detected