Files
pig-farm-controller-fe/node_modules/element-plus/es/components/scrollbar/src/util.mjs
2025-09-19 14:25:20 +08:00

35 lines
653 B
JavaScript

const GAP = 4;
const BAR_MAP = {
vertical: {
offset: "offsetHeight",
scroll: "scrollTop",
scrollSize: "scrollHeight",
size: "height",
key: "vertical",
axis: "Y",
client: "clientY",
direction: "top"
},
horizontal: {
offset: "offsetWidth",
scroll: "scrollLeft",
scrollSize: "scrollWidth",
size: "width",
key: "horizontal",
axis: "X",
client: "clientX",
direction: "left"
}
};
const renderThumbStyle = ({
move,
size,
bar
}) => ({
[bar.size]: size,
transform: `translate${bar.axis}(${move}%)`
});
export { BAR_MAP, GAP, renderThumbStyle };
//# sourceMappingURL=util.mjs.map