1.0.8 • Published 5 years ago

@mlqt/vue-back-top v1.0.8

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

vue-back-top

npm.io npm.io npm.io npm.io

A back top component for vue.js.

View demo

Install

NPM

npm install @mlqt/vue-back-top

CDN

<script src="https://unpkg.com/@mlqt/vue-back-top"></script>

Usage

Use <back-top/> to enable the scroll to the top, and use props to define its options.

When the scroll bar height is greater than 100vh, back-top is display, otherwise hidden.

<back-top color="#409EFF" :size="1.1" :slow="10"> </back-top>

<!-- Replace the default icon with slot -->
<back-top>
    <div>Icon</div>
</back-top>
import Vue from 'vue'
import BackTop from '@mlqt/vue-back-top'

Vue.use(BackTop)

new Vue().$mount('#app')

Options

PropsDescriptionRequiredTypeDefault
rightBack-top distance to the rightfalseString3%
bottomBack-top distance to the bottomfalseString20%
colorBack-top colorfalseString#409EFF
sizeBack-top sizefalseNumber1
slowBack-top The speed of scrolling, the larger the value, the slower the scrollingfalseNumber10

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

张鑫旭

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago