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

Function genSlot

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

Source from the content-addressed store, hash-verified

8805}
8806
8807function genSlot (el) {
8808 var slotName = el.slotName || '"default"';
8809 var children = genChildren(el);
8810 var res = "_t(" + slotName + (children ? ("," + children) : '');
8811 var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
8812 var bind$$1 = el.attrsMap['v-bind'];
8813 if ((attrs || bind$$1) && !children) {
8814 res += ",null";
8815 }
8816 if (attrs) {
8817 res += "," + attrs;
8818 }
8819 if (bind$$1) {
8820 res += (attrs ? '' : ',null') + "," + bind$$1;
8821 }
8822 return res + ')'
8823}
8824
8825// componentName is el.component, take it as argument to shun flow's pessimistic refinement
8826function genComponent (componentName, el) {

Callers 1

genElementFunction · 0.70

Calls 1

genChildrenFunction · 0.70

Tested by

no test coverage detected