You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,9 @@ When using client-side routing, we may want to scroll to top when navigating to
63
63
64
64
**`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**
65
65
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**
67
69
68
70
## Features
69
71
@@ -83,9 +85,9 @@ import vueScrollBehavior from 'vue-scroll-behavior'
83
85
84
86
// Using vueScrollBehavior
85
87
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
0 commit comments