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

Function genIfConditions

static/vuejs/vue.js:8574–8590  ·  view source on GitHub ↗
(conditions)

Source from the content-addressed store, hash-verified

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

Callers 1

genIfFunction · 0.70

Calls 1

genTernaryExpFunction · 0.70

Tested by

no test coverage detected