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