Sticky
Install
Register component globally via app.use, refer to Component Registration for more registration ways。
Usage
Basic Usage
Offset Top
Set Container
Offset Bottom
API
Props
| Attribute |
Description |
Type |
Default |
position v3.0.6 |
Offset position, can be set to bottom |
string |
top |
| offset-top |
Offset top, supports px vw vh rem unit, default px |
number | string |
0 |
offset-bottom v3.0.6 |
Offset bottom, supports px vw vh rem unit, default px |
number | string |
0 |
| z-index |
z-index when sticky |
number | string |
99 |
| container |
Container DOM |
Element |
- |
Events
| Event |
Description |
Arguments |
change v3.0.10 |
Emitted when sticky status changed |
isFixed: boolean |
| scroll |
Emitted when scrolling |
{ scrollTop: number, isFixed: boolean } |
Less Variables
How to use: Custom Theme.
| Name |
Default Value |
Description |
| @sticky-z-index |
99 |
- |