@@ -12,32 +12,32 @@ import chartsRouter from './modules/charts'
12
12
import tableRouter from './modules/table'
13
13
import nestedRouter from './modules/nested'
14
14
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
-
19
15
/**
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)
29
28
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
33
33
}
34
- * */
34
+ */
35
35
36
36
/**
37
37
* constantRoutes
38
38
* a base page that does not have permission requirements
39
39
* all roles can be accessed
40
- * * /
40
+ */
41
41
export const constantRoutes = [
42
42
{
43
43
path : '/redirect' ,
@@ -113,7 +113,7 @@ export const constantRoutes = [
113
113
/**
114
114
* asyncRoutes
115
115
* the routes that need to be dynamically loaded based on user roles
116
- */
116
+ */
117
117
export const asyncRoutes = [
118
118
{
119
119
path : '/permission' ,
@@ -195,7 +195,7 @@ export const asyncRoutes = [
195
195
path : 'edit/:id(\\d+)' ,
196
196
component : ( ) => import ( '@/views/example/edit' ) ,
197
197
name : 'EditArticle' ,
198
- meta : { title : 'editArticle' , noCache : true } ,
198
+ meta : { title : 'editArticle' , noCache : true , activeMenu : '/example/list' } ,
199
199
hidden : true
200
200
} ,
201
201
{
0 commit comments