1.0.1 • Published 7 years ago

@tsx-react-ui/backtop v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
7 years ago

@tsx-react-ui/backtop

  • 作者:maqing01
  • 邮箱:475986855@qq.com

介绍

The backtop component of the react written in Typescript


安装

组件使用 npm 进行管理,请使用以下命令进行组件安装:

npm i @tsx-react-ui/backtop --save
  • 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org

使用

样例文档

  • 待开发

使用

最少配置参数为:

<Backtop />

详细配置:

<Backtop className="custom-back-top" showHeight={300} target={() => document.getElementById('target')} >
    <div className="custom-back-top-icon">UP</div>
</Backtop>

配置参数

PropTypeDefaultDescription
showHeightnumber200当滚动高度超过此值时显示"返回顶部"按钮
classNamestringundefined自定义样式
targetfunction() => window返回指定滚动的DOM元素,默认为window
childrenReactNodeundefined自定义图标

注意事项

  • 组件注意事项

Changelog