File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed
Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,13 @@ export default {
2626 const pageData = {
2727 component,
2828 id,
29- props : Utils . extend ( { } , options . route . params ) ,
29+ props : Utils . extend (
30+ {
31+ f7route : options . route ,
32+ f7router : router ,
33+ } ,
34+ options . route . params
35+ ) ,
3036 } ;
3137 routerComponent . $f7router = router ;
3238 routerComponent . $f7route = options . route ;
@@ -99,7 +105,13 @@ export default {
99105 const tabContent = {
100106 id,
101107 component,
102- props : Utils . extend ( { } , options . route . params ) ,
108+ props : Utils . extend (
109+ {
110+ f7route : options . route ,
111+ f7router : router ,
112+ } ,
113+ options . route . params
114+ ) ,
103115 } ;
104116
105117 tabsComponent . $f7router = router ;
@@ -150,7 +162,13 @@ export default {
150162 const modalData = {
151163 component,
152164 id,
153- props : Utils . extend ( { } , options . route . params ) ,
165+ props : Utils . extend (
166+ {
167+ f7route : options . route ,
168+ f7router : router ,
169+ } ,
170+ options . route . params
171+ ) ,
154172 } ;
155173 modalsComponent . $f7router = router ;
156174 modalsComponent . $f7route = options . route ;
Original file line number Diff line number Diff line change @@ -54,9 +54,11 @@ const Plugin = {
5454 Object . defineProperty ( Extend . prototype , '$f7route' , {
5555 get ( ) {
5656 const self = this ;
57+ if ( self . props && self . props . f7route ) return self . props . f7route ;
58+ if ( self . f7route ) return self . f7route ;
59+ if ( self . _f7route ) return self . _f7route ;
5760 let route ;
5861 let parent = self ;
59- if ( self . _f7route ) route = self . _f7route ;
6062 while ( parent && ! route ) {
6163 if ( parent . _f7route ) route = parent . _f7route ;
6264 if ( compiler === 'vue' ) {
@@ -75,9 +77,11 @@ const Plugin = {
7577 Object . defineProperty ( Extend . prototype , '$f7router' , {
7678 get ( ) {
7779 const self = this ;
80+ if ( self . props && self . props . f7router ) return self . props . f7router ;
81+ if ( self . f7router ) return self . f7router ;
82+ if ( self . _f7router ) return self . _f7router ;
7883 let router ;
7984 let parent = self ;
80- if ( self . _f7router ) router = self . _f7router ;
8185 while ( parent && ! router ) {
8286 if ( parent . _f7router ) router = parent . _f7router ;
8387 else if ( parent . f7View ) {
You can’t perform that action at this time.
0 commit comments