@netvlies/vue-breadcrumbs
Creates breadcrumbs list based on active Vue Route
Usage
- Make sure Vue Router is installed on 4.x.x
- Install this bundle
- Add plugin to vue application:
import { createApp } from 'vue';
import { breadcrumbBundle } from '@netvlies/vue-breadcrumbs';
...
import App from './App.vue';
createApp(App).use(breadcrumbBundle);
- 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.