getScrollTop
Definition:
js
/**
* @returns The distance from the top to the current position.
* @description Get the distance from the top to the current position.
**/
Demo
Usage Example
ts
import { computed } from 'vue'
import { getScrollTop } from 'utils-snap-fn'
const fromTopValue = computed(() => {
return getScrollTop()
})