feat(compiler-core): support Suspense in templates

This commit is contained in:
Evan You
2019-10-16 17:40:00 -04:00
parent e97951dd2e
commit 4b2b29efa1
3 changed files with 123 additions and 117 deletions

View File

@@ -50,7 +50,8 @@ export const enum ElementTypes {
COMPONENT,
SLOT,
TEMPLATE,
PORTAL
PORTAL,
SUSPENSE
}
export interface Node {
@@ -101,6 +102,7 @@ export type ElementNode =
| SlotOutletNode
| TemplateNode
| PortalNode
| SuspenseNode
export interface BaseElementNode extends Node {
type: NodeTypes.ELEMENT
@@ -141,6 +143,11 @@ export interface PortalNode extends BaseElementNode {
codegenNode: ElementCodegenNode | undefined
}
export interface SuspenseNode extends BaseElementNode {
tagType: ElementTypes.SUSPENSE
codegenNode: ElementCodegenNode | undefined
}
export interface TextNode extends Node {
type: NodeTypes.TEXT
content: string