File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 11export default {
2- install ( Vue ) {
2+ install ( Vue ) {
33 Object . defineProperties ( Vue . prototype , {
44 $breadcrumbs : {
5- get ( ) {
5+ get ( ) {
66 return this . $route . matched . map ( r => {
7- let path = ''
8- let route = r
7+ let path = '' ;
8+ let route = r ;
99
10- Object . keys ( this . $route . params ) . map ( e => {
11- path = route . path . replace ( ':' + e , this . $route . params [ e ] )
12- } , this )
13- route . path = path
14- return route
15- } , this )
10+ Object . keys ( this . $route . params ) . forEach ( e => {
11+ path = route . path . replace ( ':' + e , this . $route . params [ e ] ) ;
12+ } , this ) ;
13+ route . path = path ;
14+ return route ;
15+ } , this ) ;
1616 }
1717 }
18- } )
18+ } ) ;
1919
2020 Vue . component ( 'breadcrumbs' , {
2121 methods : {
2222 getBreadcrumb : function ( bc ) {
23- return typeof bc === 'function' ? bc ( this . $route . params ) : bc
23+ return typeof bc === 'function' ? bc ( this . $route . params ) : bc ;
2424 }
2525 } ,
2626 template : `
@@ -30,6 +30,6 @@ export default {
3030 </li>
3131 </ol>
3232 `
33- } )
33+ } ) ;
3434 }
35- }
35+ } ;
You can’t perform that action at this time.
0 commit comments