File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,15 @@ export default {
9
9
} ) ;
10
10
11
11
Vue . component ( 'breadcrumbs' , {
12
+ methods : {
13
+ getBreadcrumb : function getBreadcrumb ( bc ) {
14
+ return typeof bc === 'function' ? bc ( ) : bc
15
+ } ,
16
+ } ,
12
17
template : `
13
18
<ol class="breadcrumb" v-if="$breadcrumbs.length">
14
19
<li class="breadcrumb-item" v-if="crumb.meta.breadcrumb" v-for="(crumb, i) in $breadcrumbs">
15
- <router-link active-class="active" :to="{ path: crumb.path }" :tag="i != $breadcrumbs.length - 1 ? 'a' : 'span'">{{ crumb.meta.breadcrumb }}</router-link>
20
+ <router-link active-class="active" :to="{ path: crumb.path }" :tag="i != $breadcrumbs.length - 1 ? 'a' : 'span'">{{ getBreadcrumb( crumb.meta.breadcrumb) }}</router-link>
16
21
</li>
17
22
</ol>
18
23
`
You can’t perform that action at this time.
0 commit comments