[Vuejs]-Vue.js enterprise application framework layout / menu

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 components: https://v2.vuejs.org/v2/guide/components.html#Dynamic-Components

Leave a comment