提交 391e7703 编写于 作者: P Pan

fix router deepClone bug

上级 97e94c06
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 = { ...@@ -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: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册