vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
34 lines (33 loc) • 1.13 kB
TypeScript
import { CSSProperties, Ref } from 'vue';
import { ThumbProps } from '../types';
/**
* hook
*
* @param props Thumb组件属性
* @param trackRef 组件实例
* @param thumbRef 组件实例
*/
export declare const useThumb: (props: ThumbProps, trackRef: Ref<HTMLDivElement | null>, thumbRef: Ref<HTMLDivElement | null>) => {
bar: import('vue').ComputedRef<{
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 offset: "offsetWidth";
readonly scroll: "scrollLeft";
readonly scrollSize: "scrollWidth";
readonly size: "width";
readonly key: "is-horizontal";
readonly axis: "X";
readonly client: "clientX";
readonly direction: "left";
}>;
thumbStyle: import('vue').ComputedRef<CSSProperties>;
onMousedown: (e: PointerEvent) => void;
onThumbPointerDown: (e: PointerEvent) => void;
};