Home / Function/ processIf() — vue Function Reference

processIf() — vue Function Reference

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

Function typescript VueCore Observer calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  bb1c0225_c589_5526_ef8c_1c9daa8f8ccd["processIf()"]
  101d3d34_ac07_228f_62b9_5d5ac4a0ea2e["index.ts"]
  bb1c0225_c589_5526_ef8c_1c9daa8f8ccd -->|defined in| 101d3d34_ac07_228f_62b9_5d5ac4a0ea2e
  19a26691_f7c4_e2d6_e9ed_59c6aff144df["parse()"]
  19a26691_f7c4_e2d6_e9ed_59c6aff144df -->|calls| bb1c0225_c589_5526_ef8c_1c9daa8f8ccd
  4f0d956c_7641_b36d_a23d_3803fa58d311["getAndRemoveAttr()"]
  bb1c0225_c589_5526_ef8c_1c9daa8f8ccd -->|calls| 4f0d956c_7641_b36d_a23d_3803fa58d311
  b4c1389a_2c57_28d1_1826_0c31a4a17339["addIfCondition()"]
  bb1c0225_c589_5526_ef8c_1c9daa8f8ccd -->|calls| b4c1389a_2c57_28d1_1826_0c31a4a17339
  style bb1c0225_c589_5526_ef8c_1c9daa8f8ccd 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