1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-08-08 20:29:00 +08:00

Compare commits

..

No commits in common. "5b4b0bd9ad2ecde8b9f9c5b99cc38ad8641cabf5" and "0b69d5576505e0766bd17bf8f7f949963c00db1b" have entirely different histories.

View File

@ -29,6 +29,8 @@ export const usePermissionStore = defineStore('permission', {
const route = this.generateRoute(item, item.show ? null : parent?.key)
if (item.enable && route.path && !route.path.startsWith('http'))
this.accessRoutes.push(route)
if (!item.show)
return null
const menuItem = {
label: route.meta.title,
key: route.name,
@ -46,8 +48,6 @@ export const usePermissionStore = defineStore('permission', {
if (!menuItem.children.length)
delete menuItem.children
}
if (!item.show)
return null
return menuItem
},
generateRoute(item, parentKey) {