Enable router config pass data or function

This commit is contained in:
hiluluke
2019-04-09 20:12:23 +08:00
parent 0bb3d1863d
commit 08c1929c9f
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@ export interface RouteConfig {
exact?: boolean;
strict?: boolean;
routes?: RouteConfig[];
[propName: string]: any;
}
export interface MatchedRoute<Params extends { [K in keyof Params]?: string }> {
@@ -46,7 +46,8 @@ const routes: RouteConfig[] = [
routes: [{
path: "/child/:id/grand-child",
component: GrandChild
}]
}],
loadData: () => Promise.resolve({})
}
]
}