fix bug in vuex of strict model

This commit is contained in:
Pan
2017-07-13 16:54:54 +08:00
parent 62cb24c1a6
commit 29d28c3231
3 changed files with 31 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import { asyncRouterMap, constantRouterMap } from 'src/router';
import { deepClone } from 'utils'
/**
* 通过meta.role判断是否与当前用户权限匹配
@@ -38,8 +39,8 @@ const permission = {
},
mutations: {
SET_ROUTERS: (state, routers) => {
state.addRouters = routers;
state.routers = constantRouterMap.concat(routers);
state.addRouters = deepClone(routers)
state.routers = deepClone(constantRouterMap.concat(routers))
}
},
actions: {