quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
93 lines • 2.41 kB
JSON
{
"type": "component",
"meta": {
"docsUrl": "https://v1.quasar.dev/vue-components/scroll-observer"
},
"props": {
"debounce": {
"type": [
"String",
"Number"
],
"desc": "Debounce amount (in milliseconds)",
"examples": [
"0",
"530"
],
"category": "behavior"
},
"horizontal": {
"type": "Boolean",
"desc": "Register for horizontal scroll instead of vertical (which is default)",
"category": "behavior"
},
"scroll-target": {
"type": [
"Element",
"String"
],
"desc": "CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one",
"examples": [
":scroll-target=\"$refs.scrollTarget\"",
"scroll-target=\".scroll-target-class\"",
"scroll-target=\"#scroll-target-id\"",
"scroll-target=\"body\""
],
"category": "behavior",
"addedIn": "v1.8.0"
}
},
"events": {
"scroll": {
"desc": "Emitted when scroll position changes",
"params": {
"details": {
"type": "Object",
"desc": "Scroll details",
"definition": {
"position": {
"type": "Number",
"desc": "Scroll offset (from top)",
"examples": [
822
]
},
"direction": {
"type": "String",
"desc": "Direction of scroll",
"values": [
"up",
"down"
]
},
"directionChanged": {
"type": "Boolean",
"desc": "Has scroll direction changed since event was last emitted?"
},
"inflexionPosition": {
"type": "Number",
"desc": "Last scroll offset where scroll direction has changed",
"examples": [
822
]
}
}
}
}
}
},
"methods": {
"trigger": {
"desc": "Emit a 'scroll' event",
"params": {
"immediately": {
"type": "Boolean",
"desc": "Skip over the debounce amount"
}
}
},
"getPosition": {
"desc": "Get current scroll details under the form of an Object: { position, direction, directionChanged, inflexionPosition }"
}
}
}