Skip to content

Commit 391e770

Browse files
committed
fix router deepClone bug
1 parent 97e94c0 commit 391e770

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/store/modules/permission.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { asyncRouterMap, constantRouterMap } from 'src/router';
2-
import { deepClone } from 'utils'
1+
import { asyncRouterMap, constantRouterMap } from 'src/router'
32

43
/**
54
* 通过meta.role判断是否与当前用户权限匹配
@@ -39,8 +38,8 @@ const permission = {
3938
},
4039
mutations: {
4140
SET_ROUTERS: (state, routers) => {
42-
state.addRouters = deepClone(routers)
43-
state.routers = deepClone(constantRouterMap.concat(routers))
41+
state.addRouters = routers
42+
state.routers = constantRouterMap.concat(routers)
4443
}
4544
},
4645
actions: {

0 commit comments

Comments
 (0)