Hello everyone, I would like to recommend a vUe-based scrollbar plug-in vuescroll written by myself, based on vuue.js2.0. First of all, the screenshot of the effect is as follows:
The scroll bar configuration is as follows:
option | defaultValue | description |
---|---|---|
ops | {vBar:{},hBar:{}} |
Configuration of vBar(vertical scroll bar) and hBar(horizontal scroll bar) |
scrollContentStyle | {} |
Configuration of scrollContent(scrollbar wrapped content) style, for example: {height:’100%’} |
accuracy | 5 |
Precision, that is, if the difference in pixels between the scroll panel and the scroll bar content is within this range, the scroll bar will not be displayed. |
keepVbarShow/keepHbarShow | false/false |
Whether to keep the vertical/horizontal scroll bar display. |
VBar/hBar configuration:
vBar/hBar | defaultValue | description |
---|---|---|
background | Hsla (220, %, 58%, 3) |
Scrollbar background color |
width | 5px |
Scrollbar width |
pos | left(vBar)/bottom/(hBar) |
Scrollbar position |
deltaY/deltaX | 35 |
The distance of each scroll bar. |
Vuescroll events:
event | params | description |
---|---|---|
vscroll/hscroll | bar,content |
Bar refers to the information about the scroll bar, and content refers to the details of the scroll content. |
Please give a star~ to the github file for details. The project address is as follows: vuescroll