diff --git a/docs/content/3.components/navigation-menu.md b/docs/content/3.components/navigation-menu.md index 87a09a0a..73220521 100644 --- a/docs/content/3.components/navigation-menu.md +++ b/docs/content/3.components/navigation-menu.md @@ -21,8 +21,12 @@ Use the `items` prop as an array of objects with the following properties: - `icon?: string`{lang="ts-type"} - `avatar?: AvatarProps`{lang="ts-type"} - `badge?: string | number | BadgeProps`{lang="ts-type"} +- `tooltip?: TooltipProps`{lang="ts-type"} - `trailingIcon?: string`{lang="ts-type"} - `type?: 'label' | 'link'`{lang="ts-type"} +- `collapsible?: boolean`{lang="ts-type"} +- `defaultOpen?: boolean`{lang="ts-type"} +- `open?: boolean`{lang="ts-type"} - `value?: string`{lang="ts-type"} - `disabled?: boolean`{lang="ts-type"} - `class?: any`{lang="ts-type"} @@ -140,7 +144,7 @@ Each item can take a `children` array of objects with the following properties t Use the `orientation` prop to change the orientation of the NavigationMenu. ::note -When orientation is `vertical`, a [Collapsible](/components/collapsible) component is used to display children. You can control the open state of each item using the `open` and `defaultOpen` properties. +When orientation is `vertical`, a [Collapsible](/components/collapsible) component is used to display children. You can control the open state of each item using the `open` and `defaultOpen` properties. You can also use the `collapsible` property to control if the item is collapsible. :: ::component-code diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index f7fb0c43..24251cc9 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -44,6 +44,12 @@ export interface NavigationMenuItem extends Omit(() => :class="ui.linkTrailingBadge({ class: props.ui?.linkTrailingBadge })" /> - + @@ -245,17 +251,18 @@ const lists = computed(() =>
- + (() => -