mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(vue): onBeforeRouteLeave and onBeforeRouteUpdate hooks now fire properly (#22542)
resolves #22540
This commit is contained in:
@ -11,7 +11,7 @@ import {
|
||||
onUnmounted
|
||||
} from 'vue';
|
||||
import { AnimationBuilder, LIFECYCLE_DID_ENTER, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_ENTER, LIFECYCLE_WILL_LEAVE } from '@ionic/core';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { matchedRouteKey, useRoute } from 'vue-router';
|
||||
import { fireLifecycle, generateId } from '../utils';
|
||||
|
||||
let viewDepthKey: InjectionKey<0> = Symbol(0);
|
||||
@ -31,6 +31,7 @@ export const IonRouterOutlet = defineComponent({
|
||||
});
|
||||
|
||||
provide(viewDepthKey, depth + 1)
|
||||
provide(matchedRouteKey, matchedRouteRef);
|
||||
|
||||
const ionRouterOutlet = ref();
|
||||
const id = generateId('ion-router-outlet');
|
||||
|
Reference in New Issue
Block a user