@@ -12,32 +12,32 @@ import chartsRouter from './modules/charts'
1212import tableRouter from './modules/table'
1313import nestedRouter from './modules/nested'
1414
15- /** note: sub-menu only appear when children.length>=1
16- * detail see https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
17- **/
18-
1915/**
20- * hidden: true if `hidden:true` will not show in the sidebar(default is false)
21- * alwaysShow: true if set true, will always show the root menu, whatever its child routes length
22- * if not set alwaysShow, only more than one route under the children
23- * it will becomes nested mode, otherwise not show the root menu
24- * redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
25- * name:'router-name' the name is used by <keep-alive> (must set!!!)
26- * meta : {
27- roles: ['admin','editor'] will control the page roles (you can set multiple roles)
28- title: 'title' the name show in sub-menu and breadcrumb (recommend set)
16+ * Note: sub-menu only appear when route children.length >= 1
17+ * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
18+ *
19+ * hidden: true if set true, item will not show in the sidebar(default is false)
20+ * alwaysShow: true if set true, will always show the root menu
21+ * if not set alwaysShow, when item has more than one children route,
22+ * it will becomes nested mode, otherwise not show the root menu
23+ * redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
24+ * name:'router-name' the name is used by <keep-alive> (must set!!!)
25+ * meta : {
26+ roles: ['admin','editor'] control the page roles (you can set multiple roles)
27+ title: 'title' the name show in sidebar and breadcrumb (recommend set)
2928 icon: 'svg-name' the icon show in the sidebar
30- noCache: true if true, the page will no be cached(default is false)
31- breadcrumb: false if false, the item will hidden in breadcrumb(default is true)
32- affix: true if true, the tag will affix in the tags-view
29+ noCache: true if set true, the page will no be cached(default is false)
30+ affix: true if set true, the tag will affix in the tags-view
31+ breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
32+ activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
3333 }
34- * */
34+ */
3535
3636/**
3737 * constantRoutes
3838 * a base page that does not have permission requirements
3939 * all roles can be accessed
40- * * /
40+ */
4141export const constantRoutes = [
4242 {
4343 path : '/redirect' ,
@@ -113,7 +113,7 @@ export const constantRoutes = [
113113/**
114114 * asyncRoutes
115115 * the routes that need to be dynamically loaded based on user roles
116- */
116+ */
117117export const asyncRoutes = [
118118 {
119119 path : '/permission' ,
@@ -195,7 +195,7 @@ export const asyncRoutes = [
195195 path : 'edit/:id(\\d+)' ,
196196 component : ( ) => import ( '@/views/example/edit' ) ,
197197 name : 'EditArticle' ,
198- meta : { title : 'editArticle' , noCache : true } ,
198+ meta : { title : 'editArticle' , noCache : true , activeMenu : '/example/list' } ,
199199 hidden : true
200200 } ,
201201 {
0 commit comments