From 391e7703ed137e3ee17df16d41fc215e31731af9 Mon Sep 17 00:00:00 2001 From: Pan Date: Thu, 3 Aug 2017 11:24:26 +0800 Subject: [PATCH] fix router deepClone bug --- src/store/modules/permission.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index dbbc9f4e..b5b1d318 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -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: {