[FIX] component: fix lifecycle order

This commit is contained in:
Géry Debongnie
2021-11-14 12:06:16 +01:00
committed by Aaron Bohy
parent 1f6e84d141
commit af80cefa76
3 changed files with 4 additions and 35 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ export function onWillUpdateProps(fn: (nextProps: any) => Promise<void> | void |
export function onMounted(fn: () => void | any) {
const node = getCurrent()!;
node.mounted.unshift(fn);
node.mounted.push(fn);
}
export function onWillPatch(fn: () => Promise<void> | any | void) {
@@ -32,7 +32,7 @@ export function onPatched(fn: () => void | any) {
export function onWillUnmount(fn: () => Promise<void> | void | any) {
const node = getCurrent()!;
node.willUnmount.push(fn);
node.willUnmount.unshift(fn);
}
export function onDestroyed(fn: () => Promise<void> | void | any) {