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).
91 lines (77 loc) • 2.58 kB
TypeScript
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { DefineComponent } from 'vue';
import { ModelRef } from 'vue';
import { PublicProps } from 'vue';
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
currentIndex: ModelRef<number, string, number, number>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:currentIndex": (currentIndex: number) => any;
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:currentIndex"?: ((currentIndex: number) => any) | undefined;
}>, {
interval: number;
duration: number;
width: CSSUnit;
height: CSSUnit;
showDots: boolean;
direction: Direction;
showPrev: boolean;
showNext: boolean;
pauseAutoplayOnHover: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare type __VLS_PublicProps = {
'currentIndex'?: number;
} & typeof __VLS_typeProps;
declare function __VLS_template(): {
slots: {
item?(_: {
style: {
width: `${number}px` | `${number}%` | `${number}rem` | `${number}em` | `${number}vh` | `${number}vw`;
height: `${number}px` | `${number}%` | `${number}rem` | `${number}em` | `${number}vh` | `${number}vw`;
};
src: string;
}): any;
loading?(_: {}): any;
error?(_: {}): any;
};
refs: {
carouselContainer: HTMLDivElement;
};
attrs: Partial<{}>;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare let __VLS_typeProps: VerticalCarouselProps;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare type ArrowOptions = {
show?: boolean;
image?: string;
};
declare type CSSUnit = `${number}${'px' | '%' | 'rem' | 'em' | 'vh' | 'vw'}`;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
declare type Direction = 'left' | 'right' | 'up' | 'down';
declare type VerticalCarouselItem = string | {
src: string;
};
declare interface VerticalCarouselProps {
width?: CSSUnit;
height?: CSSUnit;
items: VerticalCarouselItem[];
direction?: Direction;
duration?: number;
showPrev?: boolean;
showNext?: boolean;
showDots?: boolean;
interval?: number;
arrowOptions?: {
prev: ArrowOptions;
next: ArrowOptions;
};
pauseAutoplayOnHover?: boolean;
}
export { }