v-back

1.0.5 • Public • Published

v-back

back to the top

Installation

npm

 
$ npm i v-back -S
 

Usage

main.js:

 
import Vue from 'vue'
import App from './App.vue'
import VBack from 'v-back'
 
Vue.use(VBack)
 
// or with options
Vue.use(VBack, {
  el: '#wrapper',
  duration: 300
})
 
new Vue({
  el: 'body',
  components: {
    App
  }
})

template:

<span v-back="50">
  top
</span>

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

Readme

Keywords

Package Sidebar

Install

npm i v-back

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

3.23 kB

Total Files

3

Last publish

Collaborators

  • wuxianqiang