Skip to content

Commit 1ee956d

Browse files
committed
update readme
1 parent f81f0a8 commit 1ee956d

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

README.ZH.md

Whitespace-only changes.

README.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ See https://ibufu.github.io/vue2-scrollspy/
1414
$ npm install vue2-scrollspy --save
1515
```
1616

17-
## Setup
18-
17+
## Basic Usage
1918
```js
2019
import Vue from 'vue';
2120
import Scrollspy from 'vue2-scrollspy';
21+
// use default options
2222
Vue.use(Scrollspy);
23-
```
2423

25-
## Usage
24+
// or custom options
25+
Vue.use(Scrollspy, options);
26+
```
2627

2728
```html
2829
<ul v-scroll-spy-active v-scroll-spy-link>
@@ -46,6 +47,8 @@ Vue.use(Scrollspy);
4647
</div>
4748
```
4849

50+
## Configuration
51+
4952
### **v-scroll-spy**
5053

5154
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.
7679
1. Use `v-scroll-spy-link="{selector: 'a.menu-link'}"` to customize elements selection. By default, it will use `a` to
7780
select all links.
7881

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+
7995
## Note
8096

8197
You should have the same number of children elements for `v-scroll-spy`, `v-scroll-spy-active` `v-scroll-spy-link` for

0 commit comments

Comments
 (0)