refactor: make portal tree-shakeable

This commit is contained in:
Evan You
2020-02-15 11:40:09 -05:00
parent 0fc720c34a
commit 9d2ac6675a
14 changed files with 293 additions and 240 deletions

View File

@@ -4,9 +4,9 @@ import {
createVNode,
VNodeArrayChildren,
Fragment,
Portal,
isVNode
} from './vnode'
import { Portal, PortalProps } from './components/Portal'
import { Suspense, SuspenseProps } from './components/Suspense'
import { isObject, isArray } from '@vue/shared'
import { RawSlots } from './componentSlots'
@@ -95,7 +95,7 @@ export function h(
// portal (target prop is required)
export function h(
type: typeof Portal,
props: RawProps & { target: any },
props: RawProps & PortalProps,
children: RawChildren
): VNode