wip(ssr): renderer support for optimized and manual slots

This commit is contained in:
Evan You
2020-01-28 22:58:02 -05:00
parent a7b0954f14
commit 6b1ce00621
9 changed files with 86 additions and 37 deletions

View File

@@ -1,5 +1,10 @@
import { ComponentInternalInstance, currentInstance } from './component'
import { VNode, NormalizedChildren, normalizeVNode, VNodeChild } from './vnode'
import {
VNode,
VNodeNormalizedChildren,
normalizeVNode,
VNodeChild
} from './vnode'
import { isArray, isFunction, EMPTY_OBJ } from '@vue/shared'
import { ShapeFlags } from './shapeFlags'
import { warn } from './warning'
@@ -41,7 +46,7 @@ const normalizeSlot = (key: string, rawSlot: Function): Slot => (
export function resolveSlots(
instance: ComponentInternalInstance,
children: NormalizedChildren
children: VNodeNormalizedChildren
) {
let slots: InternalSlots | void
if (instance.vnode.shapeFlag & ShapeFlags.SLOTS_CHILDREN) {