transformNode() — vue Function Reference
Architecture documentation for the transformNode() function in class.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 2e7c25ee_983d_edd1_399c_2f07c7c41ac8["transformNode()"] b701a596_9c82_7ec4_2fc8_2e36d33c4974["getAndRemoveAttr()"] 2e7c25ee_983d_edd1_399c_2f07c7c41ac8 -->|calls| b701a596_9c82_7ec4_2fc8_2e36d33c4974 0a22351a_c237_f9ca_df3f_a6e82bad69d8["parseText()"] 2e7c25ee_983d_edd1_399c_2f07c7c41ac8 -->|calls| 0a22351a_c237_f9ca_df3f_a6e82bad69d8 0d1a9a6d_9f27_26ff_a82e_63f0ab50e4ee["getBindingAttr()"] 2e7c25ee_983d_edd1_399c_2f07c7c41ac8 -->|calls| 0d1a9a6d_9f27_26ff_a82e_63f0ab50e4ee style 2e7c25ee_983d_edd1_399c_2f07c7c41ac8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/platforms/web/compiler/modules/class.ts lines 5–27
function transformNode(el: ASTElement, options: CompilerOptions) {
const warn = options.warn || baseWarn
const staticClass = getAndRemoveAttr(el, 'class')
if (__DEV__ && staticClass) {
const res = parseText(staticClass, options.delimiters)
if (res) {
warn(
`class="${staticClass}": ` +
'Interpolation inside attributes has been removed. ' +
'Use v-bind or the colon shorthand instead. For example, ' +
'instead of <div class="{{ val }}">, use <div :class="val">.',
el.rawAttrsMap['class']
)
}
}
if (staticClass) {
el.staticClass = JSON.stringify(staticClass.replace(/\s+/g, ' ').trim())
}
const classBinding = getBindingAttr(el, 'class', false /* getStatic */)
if (classBinding) {
el.classBinding = classBinding
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does transformNode() do?
transformNode() is a function in the vue codebase.
What does transformNode() call?
transformNode() calls 3 function(s): getAndRemoveAttr, getBindingAttr, parseText.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free