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

Function renderSlot

static/vuejs/vue.esm.js:3403–3429  ·  view source on GitHub ↗

* Runtime helper for rendering

(
  name,
  fallback,
  props,
  bindObject
)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

extendFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected