refactor: 优化菜单项初始化逻辑

This commit is contained in:
Hooray
2025-07-30 23:52:05 +08:00
parent 3def174a9a
commit e086017689
+1 -1
View File
@@ -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,