feat(core): keep-alive

This commit is contained in:
Evan You
2019-10-29 22:28:38 -04:00
parent 083296ead6
commit c6cbca25fe
11 changed files with 351 additions and 53 deletions

View File

@@ -26,6 +26,8 @@ import {
onRenderTracked,
onBeforeUnmount,
onUnmounted,
onActivated,
onDeactivated,
onRenderTriggered,
DebuggerHook,
ErrorCapturedHook
@@ -226,8 +228,8 @@ export function applyOptions(
mounted,
beforeUpdate,
updated,
// TODO activated
// TODO deactivated
activated,
deactivated,
beforeUnmount,
unmounted,
renderTracked,
@@ -377,6 +379,12 @@ export function applyOptions(
if (updated) {
onUpdated(updated.bind(ctx))
}
if (activated) {
onActivated(activated.bind(ctx))
}
if (deactivated) {
onDeactivated(deactivated.bind(ctx))
}
if (errorCaptured) {
onErrorCaptured(errorCaptured.bind(ctx))
}