normalizeScopedSlot() — vue Function Reference
Architecture documentation for the normalizeScopedSlot() function in normalize-scoped-slots.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 72a3f991_d789_17e8_708a_f9561a217d44["normalizeScopedSlot()"] 81712410_81a9_d297_5ff3_adabfc4f54fd["normalize-scoped-slots.ts"] 72a3f991_d789_17e8_708a_f9561a217d44 -->|defined in| 81712410_81a9_d297_5ff3_adabfc4f54fd 1e1e5127_e2df_8612_b7e7_d738cde5407a["normalizeScopedSlots()"] 1e1e5127_e2df_8612_b7e7_d738cde5407a -->|calls| 72a3f991_d789_17e8_708a_f9561a217d44 9cbf4a42_c945_bb3f_b3f1_5fa606986612["isAsyncPlaceholder()"] 72a3f991_d789_17e8_708a_f9561a217d44 -->|calls| 9cbf4a42_c945_bb3f_b3f1_5fa606986612 style 72a3f991_d789_17e8_708a_f9561a217d44 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/vdom/helpers/normalize-scoped-slots.ts lines 65–93
function normalizeScopedSlot(vm, normalSlots, key, fn) {
const normalized = function () {
const cur = currentInstance
setCurrentInstance(vm)
let res = arguments.length ? fn.apply(null, arguments) : fn({})
res =
res && typeof res === 'object' && !isArray(res)
? [res] // single vnode
: normalizeChildren(res)
const vnode: VNode | null = res && res[0]
setCurrentInstance(cur)
return res &&
(!vnode ||
(res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
? undefined
: res
}
// this is a slot using the new v-slot syntax without scope. although it is
// compiled as a scoped slot, render fn users would expect it to be present
// on this.$slots because the usage is semantically a normal slot.
if (fn.proxy) {
Object.defineProperty(normalSlots, key, {
get: normalized,
enumerable: true,
configurable: true
})
}
return normalized
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does normalizeScopedSlot() do?
normalizeScopedSlot() is a function in the vue codebase, defined in src/core/vdom/helpers/normalize-scoped-slots.ts.
Where is normalizeScopedSlot() defined?
normalizeScopedSlot() is defined in src/core/vdom/helpers/normalize-scoped-slots.ts at line 65.
What does normalizeScopedSlot() call?
normalizeScopedSlot() calls 1 function(s): isAsyncPlaceholder.
What calls normalizeScopedSlot()?
normalizeScopedSlot() is called by 1 function(s): normalizeScopedSlots.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free