Home / Function/ processIfConditions() — vue Function Reference

processIfConditions() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b0895ac7_be65_09b3_28ea_cc60452a3e8d["processIfConditions()"]
  c27f0203_4eed_0348_4118_e8e105adc6ee["parse()"]
  c27f0203_4eed_0348_4118_e8e105adc6ee -->|calls| b0895ac7_be65_09b3_28ea_cc60452a3e8d
  1793f641_7f01_f606_9ff2_ea7585e4a784["findPrevElement()"]
  b0895ac7_be65_09b3_28ea_cc60452a3e8d -->|calls| 1793f641_7f01_f606_9ff2_ea7585e4a784
  06e12792_ae17_ac23_460b_7d8d7b5605d2["addIfCondition()"]
  b0895ac7_be65_09b3_28ea_cc60452a3e8d -->|calls| 06e12792_ae17_ac23_460b_7d8d7b5605d2
  style b0895ac7_be65_09b3_28ea_cc60452a3e8d 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']
    )
  }
}

Subdomains

Called By

Frequently Asked Questions

What does processIfConditions() do?
processIfConditions() is a function in the vue codebase.
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