mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 22:20:51 +01:00
38 lines
759 B
TypeScript
38 lines
759 B
TypeScript
import 'flyonui/flyonui'
|
|
import { Observer } from 'tailwindcss-intersect'
|
|
|
|
Observer.start()
|
|
import type {
|
|
HSOverlay,
|
|
IStaticMethods,
|
|
HSAccordion,
|
|
HSDropdown,
|
|
} from 'flyonui/flyonui'
|
|
declare global {
|
|
interface Window {
|
|
HSStaticMethods: IStaticMethods
|
|
HSOverlay: typeof HSOverlay
|
|
HSAccordion: typeof HSAccordion
|
|
HSDropdown: typeof HSDropdown
|
|
}
|
|
}
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
const router = useRouter()
|
|
router.afterEach(async () => {
|
|
setTimeout(() => {
|
|
if (window.HSStaticMethods) {
|
|
window.HSStaticMethods.autoInit()
|
|
}
|
|
}, 500)
|
|
})
|
|
|
|
if (import.meta.client) {
|
|
setTimeout(() => {
|
|
if (window.HSStaticMethods) {
|
|
window.HSStaticMethods.autoInit()
|
|
}
|
|
}, 500)
|
|
}
|
|
})
|