Получилось так.
Роутер
{
path: 'containers',
meta: {
title: 'containers',
type: 'endpointDocker'
},
component: Blank,
children: [
{
name: 'containerDockerEdit',
path: ':hash',
meta: {
title: 'edit',
type: 'endpointDocker'
},
props: true,
component: () => import('@/views/Docker/Containers/Edit')
},
{
name: 'containersDockerList',
path: '/',
meta: {
title: 'list',
type: 'endpointDocker',
hiddenInMenu: true
},
props: true,
component: () => import('@/views/Docker/Containers/Index')
}
]
}
Меню
breadcrumbs() {
const {matched} = this.$route
return matched.filter(route => !route.meta.hiddenInMenu).map((route, index) => {
const text = this.$vuetify.lang.t('$vuetify.menu.' + route.meta.title) ? this.$vuetify.lang.t('$vuetify.menu.' + route.meta.title) : ""
let to;
if (route.meta.type === 'endpointDocker') {
const url = this.$route.fullPath.split('/')
to =
index === matched.length - 1
? this.$route.path.replace(':id', url[1])
: route.path.replace(':id', url[1]) || route.redirect
} else {
to =
index === matched.length - 1
? this.$route.path
: route.path || route.redirect
}
return {
text: text,
to: to,
exact: true,
disabled: false
}
})
}