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

Function genIfConditions

static/vuejs/vue.common.js:8580–8596  ·  view source on GitHub ↗
(conditions)

Source from the content-addressed store, hash-verified

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

Callers 1

genIfFunction · 0.70

Calls 1

genTernaryExpFunction · 0.70

Tested by

no test coverage detected