vue2-breadcrumbs
Fork from samturrell/vue-breadcrumbs
Vue breadcrumbs builds on the official vue-router package to provide simple breadcrumbs.
Support Vue 2.0
Usage
Vue
or with browserify/bundler:
$ npm install vue2-breadcrumbs
var VueBreadcrumbs = Vue
Define the matching breadcrumb text in your vue-router routes as the breadcrumb:
property of a route or subRoute, e.g.:
path: '/' component: Page meta: breadcrumb: 'Home Page' path: '/foo' component: Foo meta: breadcrumb: 'Foo Page' path: '/about' component: Page meta: breadcrumb: 'About Us' children: path: 'foo' component: Foo meta: breadcrumb: 'Foo About' path: 'bar' component: Bar meta: breadcrumb: 'Bar About' ;
You can then render the breadcrumbs using the included component or using your own markup logic with the this.$breadcrumbs
property which will return an array of active routes.