* Runtime helper for rendering
( name, fallback, props, bindObject )
| 3397 | * Runtime helper for rendering <slot> |
| 3398 | */ |
| 3399 | function 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 |