mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-08-08 20:29:00 +08:00
Compare commits
2 Commits
0b69d55765
...
5b4b0bd9ad
Author | SHA1 | Date | |
---|---|---|---|
|
5b4b0bd9ad | ||
|
3c04bbce8e |
@ -29,8 +29,6 @@ export const usePermissionStore = defineStore('permission', {
|
|||||||
const route = this.generateRoute(item, item.show ? null : parent?.key)
|
const route = this.generateRoute(item, item.show ? null : parent?.key)
|
||||||
if (item.enable && route.path && !route.path.startsWith('http'))
|
if (item.enable && route.path && !route.path.startsWith('http'))
|
||||||
this.accessRoutes.push(route)
|
this.accessRoutes.push(route)
|
||||||
if (!item.show)
|
|
||||||
return null
|
|
||||||
const menuItem = {
|
const menuItem = {
|
||||||
label: route.meta.title,
|
label: route.meta.title,
|
||||||
key: route.name,
|
key: route.name,
|
||||||
@ -48,6 +46,8 @@ export const usePermissionStore = defineStore('permission', {
|
|||||||
if (!menuItem.children.length)
|
if (!menuItem.children.length)
|
||||||
delete menuItem.children
|
delete menuItem.children
|
||||||
}
|
}
|
||||||
|
if (!item.show)
|
||||||
|
return null
|
||||||
return menuItem
|
return menuItem
|
||||||
},
|
},
|
||||||
generateRoute(item, parentKey) {
|
generateRoute(item, parentKey) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user