修复:更改角色后菜单不能正确显示的问题;#179

fix: the menu does not display correctly after changing roles;
master
chenghongxing 4 years ago
parent 9ddd117d5e
commit 8ddc7c167c
  1. 3
      src/store/modules/setting.js

@ -3,6 +3,7 @@ import {ADMIN} from '@/config/default'
import {formatFullPath} from '@/utils/i18n'
import {filterMenu} from '@/utils/authority-utils'
import {getLocalSetting} from '@/utils/themeUtil'
import deepClone from 'lodash.clonedeep'
const localSetting = getLocalSetting(true)
const customTitlesStr = sessionStorage.getItem(process.env.VUE_APP_TBAS_TITLES_KEY)
@ -25,7 +26,7 @@ export default {
menuData(state, getters, rootState) {
if (state.filterMenu) {
const {permissions, roles} = rootState.account
return filterMenu(state.menuData, permissions, roles)
return filterMenu(deepClone(state.menuData), permissions, roles)
}
return state.menuData
},

Loading…
Cancel
Save