y-design-ssr
Version:
SSR component library of YUI with Vue3
86 lines (85 loc) • 1.98 kB
TypeScript
import { ExtractPropTypes, ComponentInternalInstance } from 'vue';
import { SwipePosition, Align } from '../../utils/types';
export interface PublicType {
moveTo: (index: number, withAnimation?: boolean) => void;
}
export declare const swipeProps: {
autoplayTime: {
type: NumberConstructor;
default: number;
};
duration: {
type: NumberConstructor;
default: number;
};
initIndex: {
type: NumberConstructor;
default: number;
};
loop: {
type: BooleanConstructor;
default: boolean;
};
dots: {
type: BooleanConstructor;
default: boolean;
};
dotsPosition: {
type: () => SwipePosition;
default: null;
};
dotsColor: {
type: StringConstructor;
default: string;
};
lazy: {
type: BooleanConstructor;
default: boolean;
};
vertical: {
type: BooleanConstructor;
default: boolean;
};
autoHeight: {
type: BooleanConstructor;
default: boolean;
};
itemSize: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
itemSpace: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
minSwipeDistance: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
touchable: {
type: BooleanConstructor;
default: boolean;
};
isFollowHand: {
type: BooleanConstructor;
default: boolean;
};
align: {
type: () => Align;
default: string;
};
};
export interface SwipeItemDetail {
size: number;
space: number;
isFillViewport: boolean;
}
export interface SwipeProvide {
props: ExtractPropTypes<typeof swipeProps>;
activeIndex: number;
children: ComponentInternalInstance[];
itemDetail: SwipeItemDetail;
itemShowedList: {
list: boolean[];
};
}