support update SA dialog

Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
This commit is contained in:
zhanghaibo
2022-04-18 17:17:36 +08:00
parent 47a1af503b
commit 6efbf3ce85
2 changed files with 10 additions and 2 deletions
+1
View File
@@ -123,6 +123,7 @@ export const LIFE_CYCLE_TYPES: Array<PageLifecycleHooks | string> = [
PageLifecycleHooks.ONACTIVE,
PageLifecycleHooks.ONINACTIVE,
PageLifecycleHooks.ONLAYOUTREADY,
PageLifecycleHooks.ONDIALOGUPDATED,
'onAttached',
'onDetached',
'onPageShow',
+9 -2
View File
@@ -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> = [
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);
}