fix router deepClone bug

This commit is contained in:
Pan 2017-08-03 11:24:26 +08:00
parent 97e94c067d
commit 391e7703ed
1 changed files with 3 additions and 4 deletions

View File

@ -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: {