UNPKG

vue-directional-carousel

Version:

This is a Vue 3 component that allows you to set the direction of image movement not only vertically and horizontally but also in different directions (left, right, up, down).

11 lines (10 loc) 864 B
import type { Ref } from 'vue'; import type { CarouselComputedItemsType } from '@/types/props'; export default function useImageLoading(currentIndex?: Ref<number>, computedItems?: CarouselComputedItemsType): { loadingStates: Ref<Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>, Map<string, boolean> | (Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>)>; errorStates: Ref<Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>, Map<string, boolean> | (Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>)>; loadedImages: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>; handleImageLoad: (src: string) => void; handleImageError: (src: string) => void; preloadImage: (src: string) => void; };