File tree Expand file tree Collapse file tree 1 file changed +20
-21
lines changed
src/components/navigation Expand file tree Collapse file tree 1 file changed +20
-21
lines changed Original file line number Diff line number Diff line change 11import Vue , { CreateElement , RenderContext , VNode } from 'vue' ;
22import { Route } from 'vue-router' ;
33
4- const hostStyles = {
5- display : 'flex' ,
6- position : 'absolute' ,
7- top : 0 ,
8- left : 0 ,
9- right : 0 ,
10- bottom : 0 ,
11- flexDirection : 'column' ,
12- width : '100%' ,
13- height : '100%' ,
14- } ;
15-
16- const tabsInner = {
17- position : 'relative' ,
18- flex : 1 ,
19- } ;
20-
214const tabBars = [ ] as VNode [ ] ;
225const cachedTabs = [ ] as VNode [ ] ;
236
@@ -62,10 +45,9 @@ export default {
6245 continue ;
6346 }
6447
65- // Tab was previously cached, push to render queue but don't activate
66- if ( tabIsCached ) {
67- renderQueue . push ( vnode ) ;
68- }
48+ // If tab was previously cached, push to render queue but don't activate
49+ // Otherwise push an empty node
50+ renderQueue . push ( tabIsCached ? vnode : h ( ) ) ;
6951 }
7052
7153 // Post processing after initial render
@@ -193,3 +175,20 @@ function matchRouteToTab(vnode: VNode, route: Route): string {
193175
194176 return '' ;
195177}
178+
179+ const hostStyles = {
180+ display : 'flex' ,
181+ position : 'absolute' ,
182+ top : 0 ,
183+ left : 0 ,
184+ right : 0 ,
185+ bottom : 0 ,
186+ flexDirection : 'column' ,
187+ width : '100%' ,
188+ height : '100%' ,
189+ } ;
190+
191+ const tabsInner = {
192+ position : 'relative' ,
193+ flex : 1 ,
194+ } ;
You can’t perform that action at this time.
0 commit comments