mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
chore: improve types (#115)
* wip: improve types * feat: improve types * Apply suggestions from code review Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com> * chore: update * chore: enable ci typecheck * chore: fix Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ import {
|
||||
MenuItems,
|
||||
MenuItem
|
||||
} from '@headlessui/vue'
|
||||
import type { Ref, PropType } from 'vue'
|
||||
import type { PropType } from 'vue'
|
||||
import type { RouteLocationNormalized } from 'vue-router'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { defu } from 'defu'
|
||||
@@ -153,13 +153,14 @@ function resolveItemClass ({ active, disabled }: { active: boolean, disabled: bo
|
||||
}
|
||||
|
||||
// https://github.com/tailwindlabs/headlessui/blob/f66f4926c489fc15289d528294c23a3dc2aee7b1/packages/%40headlessui-vue/src/components/menu/menu.ts#L131
|
||||
const menuApi: Ref<any> = ref(null)
|
||||
const menuApi = ref<any>(null)
|
||||
|
||||
let openTimeout: NodeJS.Timeout | null = null
|
||||
let closeTimeout: NodeJS.Timeout | null = null
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
// @ts-expect-error internals
|
||||
const menuProvides = trigger.value?.$.provides
|
||||
if (!menuProvides) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user