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

Function genElement

static/vuejs/vue.esm.js:8507–8537  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

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