Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ import vueScrollBehavior from 'vue-scroll-behavior'
// Using vueScrollBehavior
Vue.use(vueScrollBehavior, {
router: router, // The router instance
el: '#app', // Custom element
maxLength: 100, // Saved history List max length
ignore: [/\/boo/, /\/zoo/], // ignore some routes, they will directly scroll to the top
delay: 0 // Delay by a number of milliseconds
Expand All @@ -112,6 +113,7 @@ List of available Options:
Prop | Data Type | Default | Description
-------------- | ---------- | --------- | -----------
`router` | Object | | The router instance: `const router = new VueRouter({})`
`el` | String | null | CSS selector: `#app`
`ignore` | Array | `[ ]` | **RegExp** list to ignore some routes, they will directly scroll to the top
`maxLength` | Number | `50` | Saved history List max length
`delay` | Number | `0` | Delay scroll by a number of milliseconds
Expand Down
5 changes: 5 additions & 0 deletions demo/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export default {
text-align: center;
color: #2c3e50;
margin-top: 60px;

/* If you set the el option, you can open bottom code */
/* height: 80vh;
overflow-x: hidden;
overflow-y: scroll; */
}

h1, h2 {
Expand Down
2 changes: 1 addition & 1 deletion demo/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue-scroll-behavior-examples</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon type=image/x-icon href=./assets/logo.png><link href=./static/css/app.3a175396ac155d5c78f1d7ea9dca40cd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.6a9ed5caa9de9342b2c0.js></script><script type=text/javascript src=./static/js/vendor.8f147e6a84ca0c238e63.js></script><script type=text/javascript src=./static/js/app.ded39a9d9c9e1b2828d9.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue-scroll-behavior-examples</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon type=image/x-icon href=./assets/logo.png><link href=./static/css/app.3a175396ac155d5c78f1d7ea9dca40cd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.05344922165dc8e69f1c.js></script><script type=text/javascript src=./static/js/vendor.40116025a8bdf8e03de6.js></script><script type=text/javascript src=./static/js/app.a3009b26db111c863edd.js></script></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions demo/dist/static/js/app.a3009b26db111c863edd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/dist/static/js/app.a3009b26db111c863edd.js.map

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions demo/dist/static/js/app.ded39a9d9c9e1b2828d9.js

This file was deleted.

1 change: 0 additions & 1 deletion demo/dist/static/js/app.ded39a9d9c9e1b2828d9.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions demo/dist/static/js/manifest.05344922165dc8e69f1c.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading