import { ScrollbarDirection, ScrollState, DragState } from './types'; import { DefineComponent, ExtractPropTypes, ShallowReactive, ShallowRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue'; export interface ScrollbarProps { /** 滚动条高度 */ height?: string | number; /** 滚动条最大高度 */ maxHeight?: string | number; /** 包裹容器的自定义样式 */ wrapStyle?: string | Record; /** 包裹容器的自定义类名 */ wrapClass?: string; /** 视图的自定义样式 */ viewStyle?: string | Record; /** 视图的自定义类名 */ viewClass?: string; /** 不响应容器尺寸变化 */ noresize?: boolean; /** 视图的元素标签 */ tag?: string; /** 滚动条总是显示 */ always?: boolean; /** 滚动条最小尺寸 */ minSize?: number; /** 触发到达底部事件的距离 */ distance?: number; /** 滚动条顶部偏移量 */ topOffset?: number; /** 滑块宽度 */ thumbWidth?: string | number; /** 滑块悬浮宽度 */ thumbHoverWidth?: string | number; /** 是否缓存记忆位置,默认为true,开启时组件进入缓存状态时保存当前滚动位置,激活时自动滚动到对应位置 */ memoryPosition?: boolean; /** 是否阻止滚动行为冒泡,默认为false */ stopScrollBubble?: boolean; /** 是否开启水平滚动条,默认为true */ showHorizontal?: boolean; /** 是否开启垂直滚动条,默认为true */ showVertical?: boolean; } export interface ScrollbarEmits { scroll: [scrollInfo: { scrollTop: number; scrollLeft: number; }]; 'end-reached': [direction: ScrollbarDirection]; } declare const _default: __VLS_WithTemplateSlots< DefineComponent, { tag: string; always: boolean; minSize: number; distance: number; topOffset: number; height: string; memoryPosition: boolean; stopScrollBubble: boolean; showHorizontal: boolean; showVertical: boolean; }>>, { scrollTo: (optionsOrX: number | ScrollToOptions, y?: number | undefined) => void; setScrollTop: (value: number) => number | undefined; setScrollLeft: (value: number) => number | undefined; getScrollWrap: () => HTMLElement | null; scrollBottom: () => void; scrollState: ShallowReactive; dragState: ShallowRef< DragState | null, DragState | null>; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { scroll: (scrollInfo: { scrollTop: number; scrollLeft: number; }) => void; "end-reached": (direction: "horizontal" | "vertical") => void; }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps, { tag: string; always: boolean; minSize: number; distance: number; topOffset: number; height: string; memoryPosition: boolean; stopScrollBubble: boolean; showHorizontal: boolean; showVertical: boolean; }>>> & Readonly<{ onScroll?: ((scrollInfo: { scrollTop: number; scrollLeft: number; }) => any) | undefined; "onEnd-reached"?: ((direction: "horizontal" | "vertical") => any) | undefined; }>, { tag: string; height: string | number; always: boolean; minSize: number; distance: number; topOffset: number; memoryPosition: boolean; stopScrollBubble: boolean; showHorizontal: boolean; showVertical: boolean; }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, { default?(_: {}): any; }>; export default _default; type __VLS_NonUndefinedable = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable>; } : { type: PropType; required: true; }; }; type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };