0.2.0 • Published 6 years ago

vue-backtop-pack v0.2.0

Weekly downloads
10
License
-
Repository
github
Last release
6 years ago

vue-backTop

image image

A Vue.js components to scroll to top

Install

$ npm install vue-backtop-pack

Usage

import Vue from 'vue'
import vueBacktopPack from 'vue-backtop-pack'

Vue.use(vueBacktopPack)

or

<script src="vue.min.js"></script>
<!-- must place this line after vue.js -->
<script src="vue-backtop-pack.umd.min.js"></script>

Demo

<!-- default -->
<vue-backTop></vue-backTop>

<vue-backTop :height="600" :bottom="50" :right="30" @onClick="handleOnClick" @complete="handleComplete">
    <span>scrollTop</span>
</vue-backTop>

Options

PropertyDescriptionTypeDefault
heightvisible heightNumber400
bottomdistance to the bottomNumber30
rightdistance to the rightNumber30
durationanimation timeNumber1000

Callback

NameDescription
onClickwhen click
completewhen scroll to top complete