(
hook: Function & { __weh?: Function },
type: LifecycleHooks,
target: ComponentInternalInstance,
keepAliveRoot: ComponentInternalInstance,
)
| 458 | } |
| 459 | |
| 460 | function injectToKeepAliveRoot( |
| 461 | hook: Function & { __weh?: Function }, |
| 462 | type: LifecycleHooks, |
| 463 | target: ComponentInternalInstance, |
| 464 | keepAliveRoot: ComponentInternalInstance, |
| 465 | ) { |
| 466 | // injectHook wraps the original for error handling, so make sure to remove |
| 467 | // the wrapped version. |
| 468 | const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */) |
| 469 | onUnmounted(() => { |
| 470 | remove(keepAliveRoot[type]!, injected) |
| 471 | }, target) |
| 472 | } |
| 473 | |
| 474 | function resetShapeFlag(vnode: VNode) { |
| 475 | // bitwise operations to remove keep alive flags |
no test coverage detected