fix(Link): add missing slots definition

This commit is contained in:
Benjamin Canac
2024-04-18 12:54:47 +02:00
parent dc6f830785
commit 76e3d0b9f3

View File

@@ -23,6 +23,10 @@ export interface LinkProps extends NuxtLinkProps, Omit<PrimitiveProps, 'asChild'
raw?: boolean
class?: any
}
export interface LinkSlots {
default(props: { active: boolean }): any
}
</script>
<script setup lang="ts">
@@ -41,6 +45,7 @@ const props = withDefaults(defineProps<LinkProps>(), {
activeClass: '',
inactiveClass: ''
})
defineSlots<LinkSlots>()
const route = useRoute()
const nuxtLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass'))