Home / Function/ applyModelTransform() — vue Function Reference

applyModelTransform() — vue Function Reference

Architecture documentation for the applyModelTransform() function in modules.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  40bc5901_18aa_6d6f_9d37_b004a8e5387c["applyModelTransform()"]
  96d38cc7_62ee_04de_8f49_73340fb7f3ad["elementToOpenTagSegments()"]
  96d38cc7_62ee_04de_8f49_73340fb7f3ad -->|calls| 40bc5901_18aa_6d6f_9d37_b004a8e5387c
  style 40bc5901_18aa_6d6f_9d37_b004a8e5387c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/optimizing-compiler/modules.ts lines 19–33

export function applyModelTransform(el: ASTElement, state: CodegenState) {
  if (el.directives) {
    for (let i = 0; i < el.directives.length; i++) {
      const dir = el.directives[i]
      if (dir.name === 'model') {
        state.directives.model(el, dir, state.warn)
        // remove value for textarea as its converted to text
        if (el.tag === 'textarea' && el.props) {
          el.props = el.props.filter(p => p.name !== 'value')
        }
        break
      }
    }
  }
}

Subdomains

Frequently Asked Questions

What does applyModelTransform() do?
applyModelTransform() is a function in the vue codebase.
What calls applyModelTransform()?
applyModelTransform() is called by 1 function(s): elementToOpenTagSegments.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free