Home / Function/ genRadioModel() — vue Function Reference

genRadioModel() — vue Function Reference

Architecture documentation for the genRadioModel() function in model.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  1a10f80b_54fb_898b_54fd_6eee5e4ca82a["genRadioModel()"]
  14d3bb86_7a8d_fa98_8bf9_6d426675527b["model()"]
  14d3bb86_7a8d_fa98_8bf9_6d426675527b -->|calls| 1a10f80b_54fb_898b_54fd_6eee5e4ca82a
  2e03f8d2_4a5a_f1cd_1d7b_db95ba63549e["getBindingAttr()"]
  1a10f80b_54fb_898b_54fd_6eee5e4ca82a -->|calls| 2e03f8d2_4a5a_f1cd_1d7b_db95ba63549e
  4760a472_5347_3554_a7fe_3e7d21471a37["addProp()"]
  1a10f80b_54fb_898b_54fd_6eee5e4ca82a -->|calls| 4760a472_5347_3554_a7fe_3e7d21471a37
  754feb41_b555_757e_313c_0f0096cdc970["addHandler()"]
  1a10f80b_54fb_898b_54fd_6eee5e4ca82a -->|calls| 754feb41_b555_757e_313c_0f0096cdc970
  4f4016d4_c2a9_540e_d1fd_9dabe55a1d29["genAssignmentCode()"]
  1a10f80b_54fb_898b_54fd_6eee5e4ca82a -->|calls| 4f4016d4_c2a9_540e_d1fd_9dabe55a1d29
  style 1a10f80b_54fb_898b_54fd_6eee5e4ca82a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/platforms/web/compiler/directives/model.ts lines 107–117

function genRadioModel(
  el: ASTElement,
  value: string,
  modifiers?: ASTModifiers | null
) {
  const number = modifiers && modifiers.number
  let valueBinding = getBindingAttr(el, 'value') || 'null'
  valueBinding = number ? `_n(${valueBinding})` : valueBinding
  addProp(el, 'checked', `_q(${value},${valueBinding})`)
  addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true)
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does genRadioModel() do?
genRadioModel() is a function in the vue codebase.
What does genRadioModel() call?
genRadioModel() calls 4 function(s): addHandler, addProp, genAssignmentCode, getBindingAttr.
What calls genRadioModel()?
genRadioModel() is called by 1 function(s): model.

Analyze Your Own Codebase

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

Try Supermodel Free