优化菜单项初始化逻辑

This commit is contained in:
Hooray
2025-07-30 23:51:26 +08:00
parent cd8eff5f97
commit 22ab17fb25
+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,