vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
73 lines (72 loc) • 1.49 kB
TypeScript
import { default as Bar } from './bar.vue';
/**
* props
*/
export interface Props {
height?: string;
maxHeight?: string;
minSize?: number;
always?: boolean;
}
/**
* BarProps
*/
export interface BarProps {
minSize: number;
always: boolean;
}
/**
* ThumbProps
*/
export interface ThumbProps {
vertical?: boolean;
size?: string;
move?: number;
ratio: number;
always: boolean;
}
/**
* 上下文类型
*/
export type ScrollBarContextContext = {
scrollbarEl: HTMLElement;
scrollWrapEl: HTMLElement;
};
/**
* 滚动条BAR类型
*/
export declare const BAR_MAP: {
readonly vertical: {
readonly offset: "offsetHeight";
readonly scroll: "scrollTop";
readonly scrollSize: "scrollHeight";
readonly size: "height";
readonly key: "is-vertical";
readonly axis: "Y";
readonly client: "clientY";
readonly direction: "top";
};
readonly horizontal: {
readonly offset: "offsetWidth";
readonly scroll: "scrollLeft";
readonly scrollSize: "scrollWidth";
readonly size: "width";
readonly key: "is-horizontal";
readonly axis: "X";
readonly client: "clientX";
readonly direction: "left";
};
};
/**
* Bar类型
*/
export type BarInstance = InstanceType<typeof Bar>;
/**
* 组件事件类型
*/
export type Emit = {
(event: 'scroll', value: {
top: number;
left: number;
}): void;
};