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

Function renderSlot

static/vuejs/vue.runtime.js:3401–3427  ·  view source on GitHub ↗

* Runtime helper for rendering

(
  name,
  fallback,
  props,
  bindObject
)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

extendFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected