mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-06 14:53:50 +08:00
refactor: 优化菜单项初始化逻辑
This commit is contained in:
@@ -43,7 +43,7 @@ const isMenuPopup = computed<MenuInjection['isMenuPopup']>(() => {
|
||||
function initItems(menu: MenuProps['menu'], parentPaths: string[] = []) {
|
||||
menu.forEach((item) => {
|
||||
const index = item.path ?? getUseId(item)
|
||||
if (item.children) {
|
||||
if (item.children?.some(item => item.meta?.menu !== false)) {
|
||||
const indexPath = [...parentPaths, index]
|
||||
subMenus.value[index] = {
|
||||
index,
|
||||
|
||||
Reference in New Issue
Block a user