diff --git a/runtime/main/model/events.ts b/runtime/main/model/events.ts index c2f328db..d338c80d 100644 --- a/runtime/main/model/events.ts +++ b/runtime/main/model/events.ts @@ -123,6 +123,7 @@ export const LIFE_CYCLE_TYPES: Array = [ PageLifecycleHooks.ONACTIVE, PageLifecycleHooks.ONINACTIVE, PageLifecycleHooks.ONLAYOUTREADY, + PageLifecycleHooks.ONDIALOGUPDATED, 'onAttached', 'onDetached', 'onPageShow', diff --git a/runtime/main/model/pageLife.ts b/runtime/main/model/pageLife.ts index aff44b3e..b79e87c5 100644 --- a/runtime/main/model/pageLife.ts +++ b/runtime/main/model/pageLife.ts @@ -96,7 +96,11 @@ export const enum PageLifecycleHooks { /** * ONLAYOUTREADY Type */ - ONINACTIVE = 'onInactive' + ONINACTIVE = 'onInactive', + /** + * ONDIALOGUPDATED Type + */ + ONDIALOGUPDATED = 'onDialogUpdated' } /* eslint-enable no-unused-vars */ @@ -114,7 +118,8 @@ const PAGE_LIFE_CYCLE_TYPES: Array = [ PageLifecycleHooks.ONCONFIGURATIONUPDATED, PageLifecycleHooks.ONLAYOUTREADY, PageLifecycleHooks.ONACTIVE, - PageLifecycleHooks.ONINACTIVE + PageLifecycleHooks.ONINACTIVE, + PageLifecycleHooks.ONDIALOGUPDATED ]; /** @@ -184,6 +189,8 @@ export function bindPageLifeCycle(vm: Vm, element: Element): void { return handleRestoreData(args[0]); } else if (type === PageLifecycleHooks.ONCOMPLETECONTINUATION) { return vm.$emitDirect(`hook:${type}`, ...args); + } else if (type === PageLifecycleHooks.ONDIALOGUPDATED) { + return vm.$emitDirect(`hook:${type}`, args[0]); } else { return vm.$emit(`hook:${type}`, {}, ...args); }