refactor: adjust shapeFlag naming

This commit is contained in:
Evan You
2019-11-02 21:26:25 -04:00
parent 90b9884eb4
commit a651fc44f6
3 changed files with 10 additions and 9 deletions

View File

@@ -180,7 +180,7 @@ export const KeepAlive = {
vnode.anchor = cached.anchor
vnode.component = cached.component
// avoid vnode being mounted as fresh
vnode.shapeFlag |= ShapeFlags.STATEFUL_COMPONENT_KEPT_ALIVE
vnode.shapeFlag |= ShapeFlags.COMPONENT_KEPT_ALIVE
// make this key the freshest
keys.delete(key)
keys.add(key)
@@ -192,7 +192,7 @@ export const KeepAlive = {
}
}
// avoid vnode being unmounted
vnode.shapeFlag |= ShapeFlags.STATEFUL_COMPONENT_SHOULD_KEEP_ALIVE
vnode.shapeFlag |= ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE
current = vnode
return vnode