You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
653 B
24 lines
653 B
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 置顶
|
||
|
type: Other
|
||
|
english: BackTop
|
||
|
---
|
||
|
|
||
|
使用 `BackTop` 可以方便地回到顶部。
|
||
|
|
||
|
## 何时使用
|
||
|
|
||
|
当内容区域比较长,需要提供快速回到顶部的功能时。
|
||
|
|
||
|
## API
|
||
|
|
||
|
> 有默认样式,距离底部 `50px`,可覆盖。
|
||
|
|
||
|
> 自定义样式宽高有限制,不大于 40px * 40px。
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
|-------------|----------------|--------------------|--------------|
|
||
|
| visibilityHeight | 滚动高度达到此参数值才出现 `BackTop` | Number | 400 |
|
||
|
| onClick | 点击按钮的回调函数 | Function | - |
|