0👍
Nested subroutes must fit well in this case I believe.
routes: [
{
path: '',
component: Layout,
children: [
{
path: 'today',
component: Incidents,
name: 'incidents'
}
]
}
]
In order to preserve the open tabs you can use URL params as an array: ?openTab[]=incidents&openTab[]=Assistance
Using the get params you can construct the list of open tabs; and the active tab is coming from the router.
Content of the closed tabs can be loaded using dynamic component
s: https://v2.vuejs.org/v2/guide/components.html#Dynamic-Components
- [Vuejs]-How do I define a component in a slot which as a prop which is defined in the child component
- [Vuejs]-Hide popup box when clicked anywhere on the document
Source:stackexchange.com