Skip to content

Commit d6cacb0

Browse files
committed
feat: vnode新增suspense组件标识
1 parent 28298fd commit d6cacb0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/runtime-core/src/vnode.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { isArray, isBoolean, ShapeFlags } from '@coderwei-mini-vue3/shared'
22
import { isObject, isString } from '@coderwei-mini-vue3/shared'
3+
import { isSuspense } from './components/suspense'
34
import { isTeleport } from './components/Teleport'
45
export const Fragment = Symbol('Fragment')
56
export const Text = Symbol('Text')
@@ -28,6 +29,8 @@ export function getShapeFlag(type: any) {
2829
? ShapeFlags.ELEMENT
2930
: isTeleport(type)
3031
? ShapeFlags.TELEPORT
32+
: isSuspense(type)
33+
? ShapeFlags.SUSPENSE
3134
: isObject(type)
3235
? ShapeFlags.STATEFUL_COMPONENT
3336
: 0

0 commit comments

Comments
 (0)