Git Product home page Git Product logo

vue-totop's Introduction

vue-totop

markdown

vue 点击返回顶部插件,可以根据参数设定按钮大小,颜色,类型,返回顶部的时间等。

markdown

安装

npm install to-top-vue -S

#说明 是使用vue-totop二次开发的返回顶部插件,增加了监听指定元素的滚动事件

使用

注入

// ES6
import vueToTop from 'to-top-vue'
//or require
var vueToTop = require('to-top-vue')

Vue.use(vueToTop)

组件使用

<vueToTop></vueToTop>

参数

参数 说明 类型 可选值 默认值
type 按钮的类型,一共16种 number 0~15 0
top 滚动条离顶部多高时,显示返回顶部按钮 number 大于0的整数 400
right 按钮右部定位位置 number 大于0的整数 30
bottom 按钮底部定位位置 number 大于0的整数 30
size 按钮大小 number 大于0的整数 24
color 按钮颜色 string rgb/hex '#666'
duration 返回顶部的间隔时间 number 大于0的整数 300
domid 在某个元素内部滚动的id string 要监听滚动事件的元素id

vue-totop's People

Contributors

1006008051 avatar phpjavac avatar

Forkers

currypaste

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.