mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
fix(vue): pass in correct route to props function (#22605)
resolves #22602
This commit is contained in:
@ -2,6 +2,14 @@ import { AnimationBuilder } from '@ionic/core';
|
||||
import { RouteLocationMatched, RouterOptions } from 'vue-router';
|
||||
import { Ref } from 'vue';
|
||||
|
||||
export interface VueComponentData {
|
||||
/**
|
||||
* The cached result of the props
|
||||
* function for a particular view instance.
|
||||
*/
|
||||
propsFunctionResult?: any;
|
||||
}
|
||||
|
||||
export interface IonicVueRouterOptions extends RouterOptions {
|
||||
tabsPrefix?: string;
|
||||
}
|
||||
@ -43,6 +51,7 @@ export interface ViewItem {
|
||||
registerCallback?: () => void;
|
||||
vueComponentRef: Ref;
|
||||
params?: { [k: string]: any };
|
||||
vueComponentData: VueComponentData;
|
||||
}
|
||||
|
||||
export interface ViewStacks {
|
||||
|
@ -89,7 +89,8 @@ export const createViewStacks = () => {
|
||||
ionRoute: false,
|
||||
mount: false,
|
||||
exact: routeInfo.pathname === matchedRoute.path,
|
||||
params: routeInfo.params
|
||||
params: routeInfo.params,
|
||||
vueComponentData: {}
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user