Skip to content

Commit c348b42

Browse files
committed
Update README
1 parent ad3c6ba commit c348b42

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ When using client-side routing, we may want to scroll to top when navigating to
6363

6464
**`vue-scroll-behavior` allows you to customize the scrolling position on route navigation. Especially hash mode. You just need to tell it which routes need to be processed, and it will do that automatically**
6565

66-
**If you have some special scenes, we also provide some options, and you can manually use them to save or restore the scroll position**
66+
**By default, It will scroll to the saved position. If you ignore some routes, they will directly scroll to the top**
67+
68+
**Of course, If you have some special scenes, we also provide some options, and you can manually use them to save or restore the scroll position**
6769

6870
## Features
6971

@@ -83,9 +85,9 @@ import vueScrollBehavior from 'vue-scroll-behavior'
8385

8486
// Using vueScrollBehavior
8587
Vue.use(vueScrollBehavior, {
86-
router: router,
87-
maxLength: 100,
88-
ignore: [/\/boo/, /\/zoo/],
88+
router: router, // The router instance
89+
maxLength: 100, // Saved history List max length
90+
ignore: [/\/boo/, /\/zoo/] // ignore some routes, they will directly scroll to the top
8991
})
9092
```
9193

@@ -108,7 +110,7 @@ List of available Options:
108110
Prop | Data Type | Default | Description
109111
-------------- | ---------- | --------- | -----------
110112
`router` | Object | | The router instance: `const router = new VueRouter({})`
111-
`ignore` | Array | `[ ]` | **RegExp** list to ignore some routes
113+
`ignore` | Array | `[ ]` | **RegExp** list to ignore some routes, they will directly scroll to the top
112114
`maxLength` | Number | `50` | Saved history List max length
113115

114116

0 commit comments

Comments
 (0)