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

Function genElement

static/vuejs/vue.common.js:8509–8539  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

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