Creates breadcrumbs list based on active Vue Route
npm install @netvlies/vue-breadcrumbsCreates breadcrumbs list based on active Vue Route
1. Make sure Vue Router is installed on 4.x.x
2. Install this bundle
3. Add plugin to vue application:
``
import { createApp } from 'vue';
import { breadcrumbBundle } from '@netvlies/vue-breadcrumbs';
...
import App from './App.vue';
createApp(App).use(breadcrumbBundle);
`
4. Add breadcrumb text (and optional path) to your vue routes:
```
const routes = [
{
path: '/about/:test',
name: 'about',
meta: {
breadcrumb: {
parents: [
{
path: '/about/:test/test',
label: 'test'
}
],
label: 'adf'
}
},
}
]
When no path is provided, breadcrumbs falls back on parent of current breadcrumb.