forked from AkkomaGang/admin-fe
fix router deepClone bug
This commit is contained in:
parent
97e94c067d
commit
391e7703ed
1 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { asyncRouterMap, constantRouterMap } from 'src/router';
|
import { asyncRouterMap, constantRouterMap } from 'src/router'
|
||||||
import { deepClone } from 'utils'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过meta.role判断是否与当前用户权限匹配
|
* 通过meta.role判断是否与当前用户权限匹配
|
||||||
|
@ -39,8 +38,8 @@ const permission = {
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_ROUTERS: (state, routers) => {
|
SET_ROUTERS: (state, routers) => {
|
||||||
state.addRouters = deepClone(routers)
|
state.addRouters = routers
|
||||||
state.routers = deepClone(constantRouterMap.concat(routers))
|
state.routers = constantRouterMap.concat(routers)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|
Loading…
Reference in a new issue