MCPcopy Create free account
hub / github.com/TruthHun/BookStack / genElement

Function genElement

static/vuejs/vue.js:8503–8533  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

8501}
8502
8503function genElement (el) {
8504 if (el.staticRoot && !el.staticProcessed) {
8505 return genStatic(el)
8506 } else if (el.once && !el.onceProcessed) {
8507 return genOnce(el)
8508 } else if (el.for && !el.forProcessed) {
8509 return genFor(el)
8510 } else if (el.if && !el.ifProcessed) {
8511 return genIf(el)
8512 } else if (el.tag === 'template' && !el.slotTarget) {
8513 return genChildren(el) || 'void 0'
8514 } else if (el.tag === 'slot') {
8515 return genSlot(el)
8516 } else {
8517 // component or element
8518 var code;
8519 if (el.component) {
8520 code = genComponent(el.component, el);
8521 } else {
8522 var data = el.plain ? undefined : genData(el);
8523
8524 var children = el.inlineTemplate ? null : genChildren(el, true);
8525 code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
8526 }
8527 // module transforms
8528 for (var i = 0; i < transforms$1.length; i++) {
8529 code = transforms$1[i](el, code);
8530 }
8531 return code
8532 }
8533}
8534
8535// hoist static sub-trees out
8536function genStatic (el) {

Callers 8

generateFunction · 0.70
genStaticFunction · 0.70
genOnceFunction · 0.70
genTernaryExpFunction · 0.70
genForFunction · 0.70
genScopedSlotFunction · 0.70
genChildrenFunction · 0.70
genNodeFunction · 0.70

Calls 8

genStaticFunction · 0.70
genOnceFunction · 0.70
genForFunction · 0.70
genIfFunction · 0.70
genChildrenFunction · 0.70
genSlotFunction · 0.70
genComponentFunction · 0.70
genDataFunction · 0.70

Tested by

no test coverage detected