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

Function renderSlot

static/vuejs/vue.common.js:3405–3431  ·  view source on GitHub ↗

* Runtime helper for rendering

(
  name,
  fallback,
  props,
  bindObject
)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

extendFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected