v-back
back to the top
Installation
npm
$ npm i v-back -S
Usage
main.js:
Vue // or with optionsVue el: 'body' components: App
template:
top
Scroll to the top 50
use v-back
in the container
Vue.use(VBack, {
el: '#wrapper',
duration: 300,
distance: '50px'
})
Constructor Options
key | description | default | options |
---|---|---|---|
el |
scroll container | window |
String |
duration |
Rolling time | 300 |
Number |
distance |
When does the scrolling element appear? | Always appear | String |