forked from thomasbertet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrollView.vue
44 lines (43 loc) · 1.44 KB
/
ScrollView.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<template lang="pug">
component-view(v-bind:doc="doc")
</template>
<script>
export default {
data () {
return {
doc: {
title: 'Scrolling',
desc: 'The <code>v-scroll</code> directive allows you to provide callbacks when the window or a specifically defined element are scrolled.',
props: {
'v-scroll': {
params: [
[
'callback',
'Function',
'Required',
'The function to be called on scroll',
],
[
'target',
'String',
'window',
'The DOM element to bind the scroll event listener',
],
[
'options',
'Object',
'{ passive: true }',
'The options to be passed to the event listener of the binding target'
]
]
}
},
examples: [
{ header: 'Default', file: 'scroll/1', desc: 'The default behavior is to bind to the window. If no additional configuration options are needed, you can simple pass your callback function.' },
{ header: 'Scroll with options', file: 'scroll/2', desc: 'For a more fine tuned approach, you can designate the target to bind the scroll event listener.' }
]
}
}
}
}
</script>