File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,11 @@ export default {
117117 methods: {
118118 menuGenerate () {
119119 if (this .router ){
120- this .$router .addRoutes (routesGenerate (this .routerMap , this .role ))
120+ let realRoutes = routesGenerate (this .routerMap , this .role )
121+ this .$router .addRoutes (realRoutes)
122+ this .$router .options .routes = this .$router .options .routes ?
123+ this .$router .options .routes .concat (realRoutes) :
124+ realRoutes
121125 }
122126 this .siders = sideMenuGenerate (this .routerMap , this .role )
123127 },
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-privilege-menu" ,
33 "description" : " Automatically generate routes and menu by given privilege" ,
4- "version" : " 1.0.9 " ,
4+ "version" : " 1.0.10 " ,
55 "author" : " zhangkeyu" ,
66 "license" : " MIT" ,
77 "private" : false ,
You can’t perform that action at this time.
0 commit comments