fix: 优化store中权限类型
This commit is contained in:
parent
8aa0c7365f
commit
9dabe5c103
|
@ -104,9 +104,11 @@ export const useMenuStore = defineStore({
|
|||
name, params, query, state: { params }
|
||||
})
|
||||
},
|
||||
handleMenusMapById(item: { code: string, path: string }) {
|
||||
handleMenusMapById(item: { name: string, path: string }) {
|
||||
const { name, path } = item
|
||||
this.menus[name] = { path }
|
||||
if (name) {
|
||||
this.menus[name] = { path }
|
||||
}
|
||||
},
|
||||
queryMenuTree(isCommunity = false): Promise<any[]> {
|
||||
return new Promise(async (res) => {
|
||||
|
@ -115,9 +117,6 @@ export const useMenuStore = defineStore({
|
|||
if (resp.success) {
|
||||
const permission = usePermissionStore()
|
||||
let resultData = resp.result
|
||||
// if (!isNoCommunity) {
|
||||
// resultData = filterCommunityMenus(resultData)
|
||||
// }
|
||||
const components = getAsyncRoutesMap()
|
||||
const menusData = handleMenus(cloneDeep(resultData), components)
|
||||
permission.handlePermission(resultData)
|
||||
|
|
Loading…
Reference in New Issue