fix: fix shapeflags export
This commit is contained in:
parent
492c1306f6
commit
b5c501c0b4
@ -22,10 +22,11 @@ export {
|
|||||||
export { Text, Comment, Fragment, Portal, Suspense } from './vnode'
|
export { Text, Comment, Fragment, Portal, Suspense } from './vnode'
|
||||||
// Internal Components
|
// Internal Components
|
||||||
export { KeepAlive } from './keepAlive'
|
export { KeepAlive } from './keepAlive'
|
||||||
// VNode patchFlags
|
// VNode flags
|
||||||
|
export { PublicShapeFlags as ShapeFlags } from './shapeFlags'
|
||||||
import { PublicPatchFlags } from '@vue/shared'
|
import { PublicPatchFlags } from '@vue/shared'
|
||||||
export const PatchFlags = PublicPatchFlags as {
|
export const PatchFlags = PublicPatchFlags as {
|
||||||
// export flags as plain numbers to avoid d.ts relying on @vue/shared
|
// export patch flags as plain numbers to avoid d.ts relying on @vue/shared
|
||||||
// the enum type is internal anyway.
|
// the enum type is internal anyway.
|
||||||
TEXT: number
|
TEXT: number
|
||||||
CLASS: number
|
CLASS: number
|
||||||
|
@ -10,3 +10,15 @@ export const enum ShapeFlags {
|
|||||||
STATEFUL_COMPONENT_KEPT_ALIVE = 1 << 8,
|
STATEFUL_COMPONENT_KEPT_ALIVE = 1 << 8,
|
||||||
COMPONENT = ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT
|
COMPONENT = ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For runtime consumption
|
||||||
|
export const PublicShapeFlags = {
|
||||||
|
ELEMENT: ShapeFlags.ELEMENT,
|
||||||
|
FUNCTIONAL_COMPONENT: ShapeFlags.FUNCTIONAL_COMPONENT,
|
||||||
|
STATEFUL_COMPONENT: ShapeFlags.STATEFUL_COMPONENT,
|
||||||
|
TEXT_CHILDREN: ShapeFlags.TEXT_CHILDREN,
|
||||||
|
ARRAY_CHILDREN: ShapeFlags.ARRAY_CHILDREN,
|
||||||
|
SLOTS_CHILDREN: ShapeFlags.SLOTS_CHILDREN,
|
||||||
|
SUSPENSE: ShapeFlags.SUSPENSE,
|
||||||
|
COMPONENT: ShapeFlags.COMPONENT
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user