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

Function genIfConditions

static/vuejs/vue.esm.js:8578–8594  ·  view source on GitHub ↗
(conditions)

Source from the content-addressed store, hash-verified

8576}
8577
8578function genIfConditions (conditions) {
8579 if (!conditions.length) {
8580 return '_e()'
8581 }
8582
8583 var condition = conditions.shift();
8584 if (condition.exp) {
8585 return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions)))
8586 } else {
8587 return ("" + (genTernaryExp(condition.block)))
8588 }
8589
8590 // v-if with v-once should generate code like (a)?_m(0):_m(1)
8591 function genTernaryExp (el) {
8592 return el.once ? genOnce(el) : genElement(el)
8593 }
8594}
8595
8596function genFor (el) {
8597 var exp = el.for;

Callers 1

genIfFunction · 0.70

Calls 1

genTernaryExpFunction · 0.70

Tested by

no test coverage detected