L
L
lavezzi12018-03-31 11:36:33
JavaScript
lavezzi1, 2018-03-31 11:36:33

vue-router active tab indicator?

Hello. There are such routes:

{
  path: '/items/:id',
  component: layout,
  children: [
    {
      path: '',
      name: 'ItemPage',
      component: () => import('pages/items/item.vue').then(m => m.default),
    },
  ],
}

{
  path: '/items/:id/settings',
  component: layout,
  children: [
    {
      path: '',
      name: 'ItemSettings',
      component: () => import('pages/items/itemSettings.vue').then(m => m.default),
    },
  ],
};

The interface has menu items, Item and Settings. The problem is that the Item page has some logic that works with query. Example: . So, when query is present, the item in the Item menu becomes inactive. The exact: true parameter is set on the same item, so that the Item item is inactive when Settings is active. How to overcome this problem? http://localhost:8080/items/myitem?type=lol

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question