update permission.js
This commit is contained in:
parent
c70c15646e
commit
b6ec1d2e54
@ -11,15 +11,13 @@ const modules =
|
|||||||
const permission = {
|
const permission = {
|
||||||
state: {
|
state: {
|
||||||
routes: [],
|
routes: [],
|
||||||
addRoutes: [],
|
|
||||||
defaultRoutes: [],
|
defaultRoutes: [],
|
||||||
topbarRouters: [],
|
topbarRouters: [],
|
||||||
sidebarRouters: []
|
sidebarRouters: []
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_ROUTES: (state, routes) => {
|
SET_ROUTES: (state, routes) => {
|
||||||
state.addRoutes = routes
|
state.routes = constantRoutes.concat(routes)
|
||||||
state.routes = constantRoutes.concat(routes)
|
|
||||||
},
|
},
|
||||||
SET_DEFAULT_ROUTES: (state, routes) => {
|
SET_DEFAULT_ROUTES: (state, routes) => {
|
||||||
state.defaultRoutes = constantRoutes.concat(routes)
|
state.defaultRoutes = constantRoutes.concat(routes)
|
||||||
@ -66,7 +64,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
|
|||||||
route.component = Layout
|
route.component = Layout
|
||||||
} else if (route.component === 'ParentView') {
|
} else if (route.component === 'ParentView') {
|
||||||
route.component = ParentView
|
route.component = ParentView
|
||||||
}
|
}
|
||||||
// else if (route.component === 'InnerLink') {
|
// else if (route.component === 'InnerLink') {
|
||||||
// route.component = InnerLink
|
// route.component = InnerLink
|
||||||
// }
|
// }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user