mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-02 21:27:54 +01:00
fix(Link): add missing slots definition
This commit is contained in:
@@ -23,6 +23,10 @@ export interface LinkProps extends NuxtLinkProps, Omit<PrimitiveProps, 'asChild'
|
|||||||
raw?: boolean
|
raw?: boolean
|
||||||
class?: any
|
class?: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LinkSlots {
|
||||||
|
default(props: { active: boolean }): any
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -41,6 +45,7 @@ const props = withDefaults(defineProps<LinkProps>(), {
|
|||||||
activeClass: '',
|
activeClass: '',
|
||||||
inactiveClass: ''
|
inactiveClass: ''
|
||||||
})
|
})
|
||||||
|
defineSlots<LinkSlots>()
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const nuxtLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass'))
|
const nuxtLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass'))
|
||||||
|
|||||||
Reference in New Issue
Block a user