Home / Function/ processIf() — vue Function Reference

processIf() — vue Function Reference

Architecture documentation for the processIf() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  4f6c2ee8_2eba_72b6_6eac_1da03cd06187["processIf()"]
  320ee0f4_351d_a6b2_1c1c_f0f6f42fb987["index.ts"]
  4f6c2ee8_2eba_72b6_6eac_1da03cd06187 -->|defined in| 320ee0f4_351d_a6b2_1c1c_f0f6f42fb987
  e259ff52_42a6_4f54_59b8_e6bf86822027["parse()"]
  e259ff52_42a6_4f54_59b8_e6bf86822027 -->|calls| 4f6c2ee8_2eba_72b6_6eac_1da03cd06187
  0e57bf03_ee68_ffda_8b31_3f2c14b445a6["getAndRemoveAttr()"]
  4f6c2ee8_2eba_72b6_6eac_1da03cd06187 -->|calls| 0e57bf03_ee68_ffda_8b31_3f2c14b445a6
  b65ea7e3_9ebe_bd4b_239f_5933a2978e29["addIfCondition()"]
  4f6c2ee8_2eba_72b6_6eac_1da03cd06187 -->|calls| b65ea7e3_9ebe_bd4b_239f_5933a2978e29
  style 4f6c2ee8_2eba_72b6_6eac_1da03cd06187 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/parser/index.ts lines 548–565

function processIf(el) {
  const exp = getAndRemoveAttr(el, 'v-if')
  if (exp) {
    el.if = exp
    addIfCondition(el, {
      exp: exp,
      block: el
    })
  } else {
    if (getAndRemoveAttr(el, 'v-else') != null) {
      el.else = true
    }
    const elseif = getAndRemoveAttr(el, 'v-else-if')
    if (elseif) {
      el.elseif = elseif
    }
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does processIf() do?
processIf() is a function in the vue codebase, defined in src/compiler/parser/index.ts.
Where is processIf() defined?
processIf() is defined in src/compiler/parser/index.ts at line 548.
What does processIf() call?
processIf() calls 2 function(s): addIfCondition, getAndRemoveAttr.
What calls processIf()?
processIf() is called by 1 function(s): parse.

Analyze Your Own Codebase

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

Try Supermodel Free