121 lines
4.5 KiB
TypeScript
121 lines
4.5 KiB
TypeScript
import type { ExtractPublicPropTypes, StyleValue } from 'vue';
|
|
import type Scrollbar from './scrollbar.vue';
|
|
export interface ScrollbarProps {
|
|
/**
|
|
* @description trigger distance(px)
|
|
* @default 0
|
|
*/
|
|
distance?: number;
|
|
/**
|
|
* @description height of scrollbar
|
|
* @default ''
|
|
*/
|
|
height?: number | string;
|
|
/**
|
|
* @description max height of scrollbar
|
|
* @default ''
|
|
*/
|
|
maxHeight?: number | string;
|
|
/**
|
|
* @description whether to use the native scrollbar
|
|
*/
|
|
native?: boolean;
|
|
/**
|
|
* @description style of wrap
|
|
* @default ''
|
|
*/
|
|
wrapStyle?: StyleValue;
|
|
/**
|
|
* @description class of wrap
|
|
* @default ''
|
|
*/
|
|
wrapClass?: string | string[];
|
|
/**
|
|
* @description class of view
|
|
* @default ''
|
|
*/
|
|
viewClass?: string | string[];
|
|
/**
|
|
* @description style of view
|
|
* @default ''
|
|
*/
|
|
viewStyle?: StyleValue;
|
|
/**
|
|
* @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance
|
|
*/
|
|
noresize?: boolean;
|
|
/**
|
|
* @description element tag of the view
|
|
* @default 'div'
|
|
*/
|
|
tag?: keyof HTMLElementTagNameMap | (string & {});
|
|
/**
|
|
* @description always show
|
|
*/
|
|
always?: boolean;
|
|
/**
|
|
* @description minimum size of scrollbar
|
|
* @default 20
|
|
*/
|
|
minSize?: number;
|
|
/**
|
|
* @description Wrap tabindex
|
|
* @default undefined
|
|
*/
|
|
tabindex?: number | string;
|
|
/**
|
|
* @description id of view
|
|
*/
|
|
id?: string;
|
|
/**
|
|
* @description role of view
|
|
*/
|
|
role?: string;
|
|
/**
|
|
* @description native `aria-label` attribute
|
|
*/
|
|
ariaLabel?: string;
|
|
/**
|
|
* @description native `aria-orientation` attribute
|
|
*/
|
|
ariaOrientation?: 'horizontal' | 'vertical' | 'undefined';
|
|
}
|
|
/**
|
|
* @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.
|
|
*/
|
|
export declare const scrollbarProps: {
|
|
readonly ariaLabel: StringConstructor;
|
|
readonly ariaOrientation: {
|
|
readonly type: import("vue").PropType<string>;
|
|
readonly required: false;
|
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
__epPropKey: true;
|
|
};
|
|
readonly distance: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
readonly height: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
readonly maxHeight: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
readonly native: BooleanConstructor;
|
|
readonly wrapStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | false | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
|
|
readonly wrapClass: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, ArrayConstructor], unknown, unknown, "", boolean>;
|
|
readonly viewClass: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, ArrayConstructor], unknown, unknown, "", boolean>;
|
|
readonly viewStyle: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, ArrayConstructor, ObjectConstructor], unknown, unknown, "", boolean>;
|
|
readonly noresize: BooleanConstructor;
|
|
readonly tag: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
readonly always: BooleanConstructor;
|
|
readonly minSize: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 20, boolean>;
|
|
readonly tabindex: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, undefined, boolean>;
|
|
readonly id: StringConstructor;
|
|
readonly role: StringConstructor;
|
|
};
|
|
export type ScrollbarPropsPublic = ExtractPublicPropTypes<typeof scrollbarProps>;
|
|
export declare const scrollbarEmits: {
|
|
'end-reached': (direction: ScrollbarDirection) => boolean;
|
|
scroll: ({ scrollTop, scrollLeft, }: {
|
|
scrollTop: number;
|
|
scrollLeft: number;
|
|
}) => boolean;
|
|
};
|
|
export type ScrollbarEmits = typeof scrollbarEmits;
|
|
export type ScrollbarDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
export type ScrollbarInstance = InstanceType<typeof Scrollbar> & unknown;
|