mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
chore: improve types and imports
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { classNames } from '../../utils/'
|
||||
import Avatar from './Avatar'
|
||||
import { classNames } from '../../utils'
|
||||
import Avatar from './Avatar.vue'
|
||||
import $ui from '#build/ui'
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, useSlots } from 'vue'
|
||||
import type { PropType } from 'vue'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
import NuxtLink from '#app/components/nuxt-link'
|
||||
import Icon from '../elements/Icon'
|
||||
import Icon from '../elements/Icon.vue'
|
||||
import { classNames } from '../../utils'
|
||||
import $ui from '#build/ui'
|
||||
|
||||
@@ -79,7 +81,7 @@ const props = defineProps({
|
||||
default: false
|
||||
},
|
||||
to: {
|
||||
type: [String, Object],
|
||||
type: [String, Object] as PropType<RouteLocationNormalized>,
|
||||
default: null
|
||||
},
|
||||
target: {
|
||||
|
||||
@@ -42,18 +42,28 @@ import {
|
||||
MenuItems,
|
||||
MenuItem
|
||||
} from '@headlessui/vue'
|
||||
|
||||
import type { Ref } from 'vue'
|
||||
import type { Ref, PropType } from 'vue'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import NuxtLink from '#app/components/nuxt-link'
|
||||
import Icon from '../elements/Icon'
|
||||
import Avatar from '../elements/Avatar'
|
||||
import Icon from '../elements/Icon.vue'
|
||||
import Avatar from '../elements/Avatar.vue'
|
||||
import { classNames, usePopper } from '../../utils'
|
||||
import type { Avatar as AvatarType } from '../../types/avatar'
|
||||
import $ui from '#build/ui'
|
||||
|
||||
const props = defineProps({
|
||||
items: {
|
||||
type: Array,
|
||||
type: Array as PropType<{
|
||||
to: RouteLocationNormalized
|
||||
exact: boolean
|
||||
label: string
|
||||
disabled?: boolean
|
||||
slot?: string
|
||||
icon?: string
|
||||
avatar?: Partial<AvatarType>
|
||||
click?: Function
|
||||
}[][]>,
|
||||
default: () => []
|
||||
},
|
||||
placement: {
|
||||
|
||||
@@ -24,12 +24,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { PropType } from 'vue'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
import { RouterLink } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
...RouterLink.props,
|
||||
to: {
|
||||
type: [String, Object],
|
||||
type: [String, Object] as PropType<RouteLocationNormalized>,
|
||||
default: null
|
||||
},
|
||||
inactiveClass: {
|
||||
|
||||
Reference in New Issue
Block a user