Skip to content

Commit

Permalink
feat(VDropdownItem): add new nuxt props for rendering item as NuxtLink
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Jan 18, 2023
1 parent 1413f6b commit b36fc32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/dropdown/src/DropdownItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const props = withDefaults(
iconClass?: string;
newTab?: boolean;
divider?: boolean;
nuxt?: boolean;
}>(),
{
iconClass: '',
Expand All @@ -21,6 +22,8 @@ const props = withDefaults(
);
const computedComponent = computed(() => {
if (props.nuxt) return resolveComponent('NuxtLink');
if (props.href) return 'a';
return props.to ? resolveComponent('RouterLink') : 'button';
Expand Down

0 comments on commit b36fc32

Please sign in to comment.