default.render() — vue Function Reference
Architecture documentation for the default.render() function in transition-group.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 94b9bea5_805f_6496_0112_f371ad04f740["default.render()"] d64b73be_0bd0_cf9f_0a1a_986b6e6f9b5b["extractTransitionData()"] 94b9bea5_805f_6496_0112_f371ad04f740 -->|calls| d64b73be_0bd0_cf9f_0a1a_986b6e6f9b5b b6fb05fd_b015_6b22_977c_6534594c61d5["getComponentName()"] 94b9bea5_805f_6496_0112_f371ad04f740 -->|calls| b6fb05fd_b015_6b22_977c_6534594c61d5 style 94b9bea5_805f_6496_0112_f371ad04f740 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/platforms/web/runtime/components/transition-group.ts lines 58–102
render(h: Function) {
const tag: string = this.tag || this.$vnode.data.tag || 'span'
const map: Record<string, any> = Object.create(null)
const prevChildren: Array<VNode> = (this.prevChildren = this.children)
const rawChildren: Array<VNode> = this.$slots.default || []
const children: Array<VNode> = (this.children = [])
const transitionData = extractTransitionData(this)
for (let i = 0; i < rawChildren.length; i++) {
const c: VNode = rawChildren[i]
if (c.tag) {
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
children.push(c)
map[c.key] = c
;(c.data || (c.data = {})).transition = transitionData
} else if (__DEV__) {
const opts = c.componentOptions
const name: string = opts
? getComponentName(opts.Ctor.options as any) || opts.tag || ''
: c.tag
warn(`<transition-group> children must be keyed: <${name}>`)
}
}
}
if (prevChildren) {
const kept: Array<VNode> = []
const removed: Array<VNode> = []
for (let i = 0; i < prevChildren.length; i++) {
const c: VNode = prevChildren[i]
c.data!.transition = transitionData
// @ts-expect-error .getBoundingClientRect is not typed in Node
c.data!.pos = c.elm.getBoundingClientRect()
if (map[c.key!]) {
kept.push(c)
} else {
removed.push(c)
}
}
this.kept = h(tag, null, kept)
this.removed = removed
}
return h(tag, null, children)
},
Domain
Subdomains
Source
Frequently Asked Questions
What does default.render() do?
default.render() is a function in the vue codebase.
What does default.render() call?
default.render() calls 2 function(s): extractTransitionData, getComponentName.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free