[SOLVED] Routable Tabs can be used keepAlive?


#1

can i user keepAlive as that:

{
path: ‘/newsList/’,
component: NewsList,
tabs: [{
path: ‘/’,
id: ‘tab1’,
component: NewsTab,
keepAlive: true,
}, {
path: ‘/tab2/’,
id: ‘tab2’,
component: NewsTab,
keepAlive: true,
}, {
path: ‘/tab3/’,
id: ‘tab3’,
component: NewsTab,
keepAlive: true,
}]
},


#2

No, it is supported only for pages http://framework7.io/docs/routes.html#keep-alive


#3

You can also set unloadTabContent: false parameter on View to keep it alive while switching between tabs


#4

when i user it as that,‘unloadTabContent: false’ not work, Is there something wrong with the Settings?

{
path: ‘/meetingList/’,
component: MeetingList,
unloadTabContent: false,
tabs: [{
path: ‘/’,
id: ‘tab1’,
component: MeetingTab
}, {
path: ‘/tab2/’,
id: ‘tab2’,
component: MeetingTab
}, {
path: ‘/tab3/’,
id: ‘tab3’,
component: MeetingTab
}]
},


#5

This parameter must be set on View where you initialize it


#6

thank you very much! it resolved


#7

Can you tell me how to solve it?


#8

you can used unloadTabContent when created as that

created() {
this.$f7.views.current.params.unloadTabContent = false;
},


#9

nice !

The problem has been solved

thanks!