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 { deepClone } from 'utils'
|
||||
import { asyncRouterMap, constantRouterMap } from 'src/router'
|
||||
|
||||
/**
|
||||
* 通过meta.role判断是否与当前用户权限匹配
|
||||
|
@ -39,8 +38,8 @@ const permission = {
|
|||
},
|
||||
mutations: {
|
||||
SET_ROUTERS: (state, routers) => {
|
||||
state.addRouters = deepClone(routers)
|
||||
state.routers = deepClone(constantRouterMap.concat(routers))
|
||||
state.addRouters = routers
|
||||
state.routers = constantRouterMap.concat(routers)
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
|
Loading…
Reference in a new issue