gg-y-ui
Version:
An enterprise-class UI design language and Vue-based implementation for web
51 lines (43 loc) • 1.12 kB
TypeScript
import { YUIComponent } from './component';
interface ScrollbarInstance {
wrapperEl: HTMLElement;
wrapperScrollTop: number;
wrapperScrollLeft: number;
wrapperScrollHeight: number;
wrapperScrollWidth: number;
el: HTMLElement;
width: number;
height: number;
}
/** Scrollbar Component */
export declare class YScrollbar extends YUIComponent {
/** Determine the scroll used by native scrollbar or not */
native: boolean;
/**
* Determine the component resize event is enable
* @default: true
*/
enableResizeListener: boolean;
/**
* The distance of scroll bottom, would trigger scrollOnBottom and bottom event
* @default: 0
*/
bottomDistance: number;
/**
* Custom function, would trigger when the scroll on bottom
* @default: null
*/
scrollOnBottom: () => void;
/**
* scroll event
*
* <y-scrollbar @scroll="xx"></y-scrollbar>
*/
scroll: (si: ScrollbarInstance) => void;
/**
* Like scrollOnBottom, bottom event
*
* <y-scrollbar @bottom="xx"></y-scrollbar>
* */
bottom: () => void;
}