This repository was archived by the owner on May 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
2- <div class =" recursive__list__item" >
2+ <!-- Component default behavior: route rendering when route has a title value
3+ and no hidden setting. -->
4+ <div
5+ class =" recursive__list__item"
6+ v-if =" !route.meta.hidden && route.meta.title"
7+ >
38
4- <!-- route without child route -->
9+ <!-- route rendering without child route -->
510 <template v-if =" ! route .children " >
611 <el-menu-item
712 :index =" resolvePath(route.path)"
813 >{{route.meta.title}}</el-menu-item >
914 </template >
1015
11- <!-- route with child route: recursive area -->
16+ <!-- route rendering with child route: recursive area -->
1217 <el-submenu
1318 v-else
1419 :index =" route.path"
Original file line number Diff line number Diff line change 11import { constantComponents , plainExport } from 'ROUTER/components'
22import permission from 'PERMISSION/roles-map'
33
4+ /**
5+ * meta: {
6+ * title: 'route title', // Route will be hidden if meta.title is falsy value
7+ * icon: '', // title text icon name
8+ * layout: '', // layout name, 'plain' or 'material'(default value)
9+ * roles: ['admin', 'user'] // current route access
10+ * }
11+ */
412export default [
513 {
614 path : '/' ,
7- redirect : '/home' ,
8- meta : {
9- hidden : true
10- }
15+ redirect : '/home'
1116 } ,
1217 {
1318 path : '/home' ,
1419 name : 'home' ,
15- component : constantComponents . pagesHome ,
16- meta : {
17- title : 'Home'
18- }
20+ component : constantComponents . pagesHome
1921 } ,
2022 {
2123 path : '/login' ,
2224 name : 'login' ,
2325 component : constantComponents . pagesLogin ,
2426 meta : {
25- title : 'Login' ,
2627 layout : 'plain'
2728 }
2829 } ,
@@ -69,16 +70,10 @@ export default [
6970 } ,
7071 {
7172 path : '/403' ,
72- component : constantComponents . pagesErrorUnauthorized ,
73- meta : {
74- title : 'Unauthorized'
75- }
73+ component : constantComponents . pagesErrorUnauthorized
7674 } ,
7775 {
7876 path : '/404' ,
79- component : constantComponents . pagesErrorNotFound ,
80- meta : {
81- title : 'NotFound'
82- }
77+ component : constantComponents . pagesErrorNotFound
8378 }
8479]
You can’t perform that action at this time.
0 commit comments