mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
fix(vue): lifecycle events are correctly fired in component context (#22348)
resolves #22338
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { AnimationBuilder } from '@ionic/core';
|
||||
import { RouteLocationMatched, RouterOptions } from 'vue-router';
|
||||
import { Ref } from 'vue';
|
||||
|
||||
export interface IonicVueRouterOptions extends RouterOptions {
|
||||
tabsPrefix?: string;
|
||||
@ -40,6 +41,7 @@ export interface ViewItem {
|
||||
mount: boolean;
|
||||
exact: boolean;
|
||||
registerCallback?: () => void;
|
||||
vueComponentRef: Ref;
|
||||
}
|
||||
|
||||
export interface ViewStacks {
|
||||
|
@ -5,6 +5,7 @@ import { RouteInfo,
|
||||
ViewStacks,
|
||||
} from './types';
|
||||
import { RouteLocationMatched } from 'vue-router';
|
||||
import { shallowRef } from 'vue';
|
||||
|
||||
export const createViewStacks = () => {
|
||||
let viewStacks: ViewStacks = {};
|
||||
@ -95,6 +96,7 @@ export const createViewStacks = () => {
|
||||
matchedRoute,
|
||||
ionPageElement: ionPage,
|
||||
vueComponent,
|
||||
vueComponentRef: shallowRef(),
|
||||
ionRoute: false,
|
||||
mount: false,
|
||||
exact: routeInfo.pathname === matchedRoute.path
|
||||
|
Reference in New Issue
Block a user