Home / Function/ genInlineTemplate() — vue Function Reference

genInlineTemplate() — vue Function Reference

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

Function typescript VueCore GlobalAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  e938c7fb_0689_18e9_dee1_047bd690c1b0["genInlineTemplate()"]
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  e938c7fb_0689_18e9_dee1_047bd690c1b0 -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2
  2f9548d4_5dab_e18c_c75b_5e2c2bf4a780["genData()"]
  2f9548d4_5dab_e18c_c75b_5e2c2bf4a780 -->|calls| e938c7fb_0689_18e9_dee1_047bd690c1b0
  e748fb47_6716_51f2_1c20_197a7392a425["generate()"]
  e938c7fb_0689_18e9_dee1_047bd690c1b0 -->|calls| e748fb47_6716_51f2_1c20_197a7392a425
  style e938c7fb_0689_18e9_dee1_047bd690c1b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codegen/index.ts lines 392–411

function genInlineTemplate(
  el: ASTElement,
  state: CodegenState
): string | undefined {
  const ast = el.children[0]
  if (__DEV__ && (el.children.length !== 1 || ast.type !== 1)) {
    state.warn(
      'Inline-template components must have exactly one child element.',
      { start: el.start }
    )
  }
  if (ast && ast.type === 1) {
    const inlineRenderFns = generate(ast, state.options)
    return `inlineTemplate:{render:function(){${
      inlineRenderFns.render
    }},staticRenderFns:[${inlineRenderFns.staticRenderFns
      .map(code => `function(){${code}}`)
      .join(',')}]}`
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does genInlineTemplate() do?
genInlineTemplate() is a function in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is genInlineTemplate() defined?
genInlineTemplate() is defined in src/compiler/codegen/index.ts at line 392.
What does genInlineTemplate() call?
genInlineTemplate() calls 1 function(s): generate.
What calls genInlineTemplate()?
genInlineTemplate() is called by 1 function(s): genData.

Analyze Your Own Codebase

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

Try Supermodel Free