Skip to content

Commit 22ab17f

Browse files
committed
优化菜单项初始化逻辑
1 parent cd8eff5 commit 22ab17f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layouts/components/Menu/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const isMenuPopup = computed<MenuInjection['isMenuPopup']>(() => {
4343
function initItems(menu: MenuProps['menu'], parentPaths: string[] = []) {
4444
menu.forEach((item) => {
4545
const index = item.path ?? getUseId(item)
46-
if (item.children) {
46+
if (item.children?.some(item => item.meta?.menu !== false)) {
4747
const indexPath = [...parentPaths, index]
4848
subMenus.value[index] = {
4949
index,

0 commit comments

Comments
 (0)