Home / Function/ processIfConditions() — vue Function Reference

processIfConditions() — vue Function Reference

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

Function typescript VueCore VDom calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  c884999e_bd3e_83b2_f046_49d3a385e621["processIfConditions()"]
  101d3d34_ac07_228f_62b9_5d5ac4a0ea2e["index.ts"]
  c884999e_bd3e_83b2_f046_49d3a385e621 -->|defined in| 101d3d34_ac07_228f_62b9_5d5ac4a0ea2e
  19a26691_f7c4_e2d6_e9ed_59c6aff144df["parse()"]
  19a26691_f7c4_e2d6_e9ed_59c6aff144df -->|calls| c884999e_bd3e_83b2_f046_49d3a385e621
  3e388cca_bc0a_97e5_b53f_2900ace22029["findPrevElement()"]
  c884999e_bd3e_83b2_f046_49d3a385e621 -->|calls| 3e388cca_bc0a_97e5_b53f_2900ace22029
  b4c1389a_2c57_28d1_1826_0c31a4a17339["addIfCondition()"]
  c884999e_bd3e_83b2_f046_49d3a385e621 -->|calls| b4c1389a_2c57_28d1_1826_0c31a4a17339
  style c884999e_bd3e_83b2_f046_49d3a385e621 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/parser/index.ts lines 567–581

function processIfConditions(el, parent) {
  const prev = findPrevElement(parent.children)
  if (prev && prev.if) {
    addIfCondition(prev, {
      exp: el.elseif,
      block: el
    })
  } else if (__DEV__) {
    warn(
      `v-${el.elseif ? 'else-if="' + el.elseif + '"' : 'else'} ` +
        `used on element <${el.tag}> without corresponding v-if.`,
      el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
    )
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does processIfConditions() do?
processIfConditions() is a function in the vue codebase, defined in src/compiler/parser/index.ts.
Where is processIfConditions() defined?
processIfConditions() is defined in src/compiler/parser/index.ts at line 567.
What does processIfConditions() call?
processIfConditions() calls 2 function(s): addIfCondition, findPrevElement.
What calls processIfConditions()?
processIfConditions() 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