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

Function renderSlot

static/vuejs/vue.runtime.esm.js:3399–3425  ·  view source on GitHub ↗

* Runtime helper for rendering

(
  name,
  fallback,
  props,
  bindObject
)

Source from the content-addressed store, hash-verified

3397 * Runtime helper for rendering <slot>
3398 */
3399function renderSlot (
3400 name,
3401 fallback,
3402 props,
3403 bindObject
3404) {
3405 var scopedSlotFn = this.$scopedSlots[name];
3406 if (scopedSlotFn) { // scoped slot
3407 props = props || {};
3408 if (bindObject) {
3409 extend(props, bindObject);
3410 }
3411 return scopedSlotFn(props) || fallback
3412 } else {
3413 var slotNodes = this.$slots[name];
3414 // warn duplicate slot usage
3415 if (slotNodes && process.env.NODE_ENV !== 'production') {
3416 slotNodes._rendered && warn(
3417 "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
3418 "- this will likely cause render errors.",
3419 this
3420 );
3421 slotNodes._rendered = true;
3422 }
3423 return slotNodes || fallback
3424 }
3425}
3426
3427/* */
3428

Callers

nothing calls this directly

Calls 2

extendFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected