File tree 2 files changed +20
-4
lines changed
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,16 @@ See https://ibufu.github.io/vue2-scrollspy/
14
14
$ npm install vue2-scrollspy --save
15
15
```
16
16
17
- ## Setup
18
-
17
+ ## Basic Usage
19
18
``` js
20
19
import Vue from ' vue' ;
21
20
import Scrollspy from ' vue2-scrollspy' ;
21
+ // use default options
22
22
Vue .use (Scrollspy);
23
- ```
24
23
25
- ## Usage
24
+ // or custom options
25
+ Vue .use (Scrollspy, options);
26
+ ```
26
27
27
28
``` html
28
29
<ul v-scroll-spy-active v-scroll-spy-link >
@@ -46,6 +47,8 @@ Vue.use(Scrollspy);
46
47
</div >
47
48
```
48
49
50
+ ## Configuration
51
+
49
52
### ** v-scroll-spy**
50
53
51
54
Declares container of sections for elements to scrollspy.
@@ -76,6 +79,19 @@ Add click handler on children elements that will scroll to the related section.
76
79
1 . Use ` v-scroll-spy-link="{selector: 'a.menu-link'}" ` to customize elements selection. By default, it will use ` a ` to
77
80
select all links.
78
81
82
+ ### Bezier animations
83
+
84
+ Example:
85
+ ``` js
86
+ import scrollSpy , { Easing } from ' vue2-scrollspy' ;
87
+
88
+ Vue .use (scrollSpy, {
89
+ easing: Easing .Cubic .In
90
+ });
91
+ ```
92
+ Easing options:
93
+ http://tweenjs.github.io/tween.js/examples/03_graphs.html
94
+
79
95
## Note
80
96
81
97
You should have the same number of children elements for ` v-scroll-spy ` , ` v-scroll-spy-active ` ` v-scroll-spy-link ` for
You can’t perform that action at this time.
0 commit comments