bee-backtop

1.0.2 • Public • Published

bee-backtop

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react bee-backtop component for tinper-bee

返回顶部

使用方法

import BackTop from 'bee-backtop';

class BackTopDemo extends Component {
    render() {
        return (
            <BackTop/>
        )
    }
}

样式引入

  • 可以使用link引入build目录下BackTop.css
<link rel="stylesheet" href="./node_modules/bee-backtop/build/BackTop.css">
  • 可以在js中import样式
import "./node_modules/bee-backtop/src/BackTop.scss"
//或是
import "./node_modules/bee-backtop/build/BackTop.css"

API

参数 说明 类型 默认值
visibilityHeight 当滚动条高度达到多少显示backtop number 400
target 设置要监听滚动事件的元素 function () => window
click 点击backTop时的回调函数 function -
character 自定义字符 ReactNode/string

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-backtop
cd bee-backtop
$ npm install
$ npm run dev

Package Sidebar

Install

npm i bee-backtop

Weekly Downloads

42

Version

1.0.2

License

MIT

Unpacked Size

17.4 kB

Total Files

16

Last publish

Collaborators

  • rongqb
  • duxue
  • jwangyangls
  • shaohlr
  • honely1314
  • xiaoshutong
  • yonyoufed
  • jonyw
  • guoyongfeng
  • kvkens
  • whizbz
  • npm_yx
  • bjyxszd
  • tinper-bot
  • gaox2025f
  • gcht163
  • cnkvkens
  • diozhu
  • wangjings123
  • liushaozhen
  • ahua52