@opensig/opendesign
Version:
241 lines (240 loc) • 7.37 kB
TypeScript
import { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue';
export type ScrollerDirection = 'x' | 'y';
export declare const ScrollerSizeTypes: readonly ["medium", "small"];
export type ScrollerSizeT = (typeof ScrollerSizeTypes)[number];
export declare const baseScrollarProps: {
/**
* @zh-CN 隐藏横向滚动条
* @en-US Hide the horizontal scroll bar.
*/
disabledX: {
type: BooleanConstructor;
required: false;
};
/**
* @zh-CN 隐藏纵向滚动条
* @en-US Hide the vertical scroll bar.
*/
disabledY: {
type: BooleanConstructor;
};
/**
* @zh-CN 滚动条在停止滚动多长时间后隐藏, 单位:ms
* @en-US How long after the scroll bar stops scrolling is hidden, unit: ms.
* @default 600
*/
duration: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 滚动条显示控制
* always:一直显示
* auto: 滚动中、滚动后hover滚动条、拖拽时显示
* hover: 滚动条hover时显示
* never: 不显示滚动条
* @en-US The scroll bar displays the control.
* always:Always displayed.
* auto: The hover bar is displayed while scrolling, after scrolling, and when dragging.
* hover: It is displayed when the scroll bar hovers.
* never: The scroll bar is not displayed.
* @default 'auto'
*/
showType: {
type: PropType<"auto" | "always" | "hover" | "never">;
default: string;
};
/**
* @zh-CN 滚动条尺寸大小
* @en-US The size of the scroll bar.
* @default 'medium'
*/
size: {
type: PropType<ScrollerSizeT>;
default: string;
};
/**
* @zh-CN showType = always时,是否根据滚动容器滚动高度变化自动刷新滚动条
* @en-US When showType = always, does the scroll bar automatically refresh according to the change in the scroll height of the scroll container.
*/
autoUpdateOnScrollSize: {
type: BooleanConstructor;
};
/**
* @zh-CN 自定义滚动条类
* @en-US Custom scroll bar class.
* @since 1.2.0
*/
barClass: {
type: PropType<string | {
[k: string]: boolean;
} | Array<{
[k: string]: boolean;
} | string>>;
};
};
export type BaseScrollerPropsT = ExtractPropTypes<typeof baseScrollarProps>;
export declare const scrollerProps: {
/**
* @zh-CN 滚动容器类
* @en-US Rolling container class.
*/
wrapClass: {
type: PropType<string | {
[k: string]: boolean;
} | Array<{
[k: string]: boolean;
} | string>>;
};
/**
* @zh-CN 隐藏横向滚动条
* @en-US Hide the horizontal scroll bar.
*/
disabledX: {
type: BooleanConstructor;
required: false;
};
/**
* @zh-CN 隐藏纵向滚动条
* @en-US Hide the vertical scroll bar.
*/
disabledY: {
type: BooleanConstructor;
};
/**
* @zh-CN 滚动条在停止滚动多长时间后隐藏, 单位:ms
* @en-US How long after the scroll bar stops scrolling is hidden, unit: ms.
* @default 600
*/
duration: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 滚动条显示控制
* always:一直显示
* auto: 滚动中、滚动后hover滚动条、拖拽时显示
* hover: 滚动条hover时显示
* never: 不显示滚动条
* @en-US The scroll bar displays the control.
* always:Always displayed.
* auto: The hover bar is displayed while scrolling, after scrolling, and when dragging.
* hover: It is displayed when the scroll bar hovers.
* never: The scroll bar is not displayed.
* @default 'auto'
*/
showType: {
type: PropType<"auto" | "always" | "hover" | "never">;
default: string;
};
/**
* @zh-CN 滚动条尺寸大小
* @en-US The size of the scroll bar.
* @default 'medium'
*/
size: {
type: PropType<ScrollerSizeT>;
default: string;
};
/**
* @zh-CN showType = always时,是否根据滚动容器滚动高度变化自动刷新滚动条
* @en-US When showType = always, does the scroll bar automatically refresh according to the change in the scroll height of the scroll container.
*/
autoUpdateOnScrollSize: {
type: BooleanConstructor;
};
/**
* @zh-CN 自定义滚动条类
* @en-US Custom scroll bar class.
* @since 1.2.0
*/
barClass: {
type: PropType<string | {
[k: string]: boolean;
} | Array<{
[k: string]: boolean;
} | string>>;
};
};
export type ScrollerPropsT = ExtractPropTypes<typeof scrollerProps>;
export declare const scrollbarProps: {
/**
* @zh-CN 滚动关联目标容器,支持body、元素ref、HTMLElement
* @en-US Scroll to associate the target container, supporting body, element ref, and HTMLElement.
* @default null
*/
target: {
type: PropType<HTMLElement | ComponentPublicInstance | string | null>;
default: null;
};
/**
* @zh-CN 隐藏横向滚动条
* @en-US Hide the horizontal scroll bar.
*/
disabledX: {
type: BooleanConstructor;
required: false;
};
/**
* @zh-CN 隐藏纵向滚动条
* @en-US Hide the vertical scroll bar.
*/
disabledY: {
type: BooleanConstructor;
};
/**
* @zh-CN 滚动条在停止滚动多长时间后隐藏, 单位:ms
* @en-US How long after the scroll bar stops scrolling is hidden, unit: ms.
* @default 600
*/
duration: {
type: NumberConstructor;
default: number;
};
/**
* @zh-CN 滚动条显示控制
* always:一直显示
* auto: 滚动中、滚动后hover滚动条、拖拽时显示
* hover: 滚动条hover时显示
* never: 不显示滚动条
* @en-US The scroll bar displays the control.
* always:Always displayed.
* auto: The hover bar is displayed while scrolling, after scrolling, and when dragging.
* hover: It is displayed when the scroll bar hovers.
* never: The scroll bar is not displayed.
* @default 'auto'
*/
showType: {
type: PropType<"auto" | "always" | "hover" | "never">;
default: string;
};
/**
* @zh-CN 滚动条尺寸大小
* @en-US The size of the scroll bar.
* @default 'medium'
*/
size: {
type: PropType<ScrollerSizeT>;
default: string;
};
/**
* @zh-CN showType = always时,是否根据滚动容器滚动高度变化自动刷新滚动条
* @en-US When showType = always, does the scroll bar automatically refresh according to the change in the scroll height of the scroll container.
*/
autoUpdateOnScrollSize: {
type: BooleanConstructor;
};
/**
* @zh-CN 自定义滚动条类
* @en-US Custom scroll bar class.
* @since 1.2.0
*/
barClass: {
type: PropType<string | {
[k: string]: boolean;
} | Array<{
[k: string]: boolean;
} | string>>;
};
};
export type ScrollbarPropsT = ExtractPropTypes<typeof scrollbarProps>;