diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index 2b90e546e4..e6447cc619 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -185,7 +185,7 @@ const contentProps = toRef(() => props.content) const appConfig = useAppConfig() const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate<{ item: NavigationMenuItem, index: number, active?: boolean }>() -const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: NavigationMenuItem, index: number }>() +const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: NavigationMenuItem, index: number, level?: number }>() const ui = computed(() => navigationMenu({ orientation: props.orientation, @@ -237,7 +237,7 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0] - + props.items?.length ? (Array.isArray(props.items[0] - + @@ -292,7 +292,14 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0] diff --git a/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap b/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap index 77b4ac2e97..46d30dd05d 100644 --- a/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap @@ -5,7 +5,7 @@ exports[`NavigationMenu > renders with arrow correctly 1`] = `
  • -
  • @@ -52,7 +52,7 @@ exports[`NavigationMenu > renders with as correctly 1`] = `
    • -
    • @@ -96,7 +96,7 @@ exports[`NavigationMenu > renders with class correctly 1`] = `
      • -
      • @@ -140,7 +140,7 @@ exports[`NavigationMenu > renders with content orientation vertical correctly 1`
        • -
        • @@ -185,7 +185,7 @@ exports[`NavigationMenu > renders with custom slot correctly 1`] = `
          • -
          • @@ -229,7 +229,7 @@ exports[`NavigationMenu > renders with item slot correctly 1`] = `
            • -
            • +
            • @@ -267,7 +267,7 @@ exports[`NavigationMenu > renders with item-label slot correctly 1`] = `
              • -
              • @@ -311,7 +311,7 @@ exports[`NavigationMenu > renders with item-leading slot correctly 1`] = `
                • -
                • @@ -355,7 +355,7 @@ exports[`NavigationMenu > renders with item-trailing slot correctly 1`] = `
                  • -
                  • +
                  • @@ -393,7 +393,7 @@ exports[`NavigationMenu > renders with items correctly 1`] = `
                    • -
                    • @@ -437,7 +437,7 @@ exports[`NavigationMenu > renders with labelKey correctly 1`] = `
                      • -
                      • @@ -481,7 +481,7 @@ exports[`NavigationMenu > renders with modelValue correctly 1`] = `
                        • -
                        • @@ -526,7 +526,7 @@ exports[`NavigationMenu > renders with neutral variant link correctly 1`] = `
                          • -
                          • @@ -570,7 +570,7 @@ exports[`NavigationMenu > renders with neutral variant link highlight correctly
                            • -
                            • @@ -614,7 +614,7 @@ exports[`NavigationMenu > renders with neutral variant link highlight neutral co
                              • -
                              • @@ -658,7 +658,7 @@ exports[`NavigationMenu > renders with neutral variant pill correctly 1`] = `
                                • -
                                • @@ -702,7 +702,7 @@ exports[`NavigationMenu > renders with neutral variant pill highlight correctly
                                  • -
                                  • @@ -746,7 +746,7 @@ exports[`NavigationMenu > renders with neutral variant pill highlight neutral co
                                    • -
                                    • @@ -803,7 +803,7 @@ exports[`NavigationMenu > renders with orientation vertical correctly 1`] = `
                                  • -
                                  • +