@opensig/opendesign
Version:
97 lines (96 loc) • 2.53 kB
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const ScrollerSizeTypes = ["medium", "small"];
const baseScrollarProps = {
/**
* @zh-CN 隐藏横向滚动条
* @en-US Hide the horizontal scroll bar.
*/
disabledX: {
type: Boolean,
required: false
},
/**
* @zh-CN 隐藏纵向滚动条
* @en-US Hide the vertical scroll bar.
*/
disabledY: {
type: Boolean
},
/**
* @zh-CN 滚动条在停止滚动多长时间后隐藏, 单位:ms
* @en-US How long after the scroll bar stops scrolling is hidden, unit: ms.
* @default 600
*/
duration: {
type: Number,
default: 600
},
/**
* @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: String,
default: "auto"
},
/**
* @zh-CN 滚动条尺寸大小
* @en-US The size of the scroll bar.
* @default 'medium'
*/
size: {
type: String,
default: "medium"
},
/**
* @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: Boolean
},
/**
* @zh-CN 自定义滚动条类
* @en-US Custom scroll bar class.
* @since 1.2.0
*/
barClass: {
type: [String, Array, Object]
}
};
const scrollerProps = {
...baseScrollarProps,
/**
* @zh-CN 滚动容器类
* @en-US Rolling container class.
*/
wrapClass: {
type: [String, Array, Object]
}
};
const scrollbarProps = {
...baseScrollarProps,
/**
* @zh-CN 滚动关联目标容器,支持body、元素ref、HTMLElement
* @en-US Scroll to associate the target container, supporting body, element ref, and HTMLElement.
* @default null
*/
target: {
type: [String, Object],
default: null
}
};
exports.ScrollerSizeTypes = ScrollerSizeTypes;
exports.baseScrollarProps = baseScrollarProps;
exports.scrollbarProps = scrollbarProps;
exports.scrollerProps = scrollerProps;