Backtop 回到顶部
返回页面顶部的按钮。
基础用法
向下滚动页面即可看到右下角的按钮。
Scroll down to see the bottom-right button.
自定义展示
展示区域为 40px × 40px。
Scroll down to see the bottom-right button.
回到顶部 API
回到顶部 属性
| 名称 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| target | 触发滚动的滚动容器 | string | — |
| visibility-height | 滚动高度达到该值后才显示按钮 | number | 200 |
| right | 控制距离右侧距离 | number | 40 |
| bottom | 控制距离底部距离 | number | 40 |
回到顶部 事件
| 事件名 | 说明 | 类型 |
|---|---|---|
| click | 点击时触发 | Function |
回到顶部 插槽
| 名称 | 说明 |
|---|---|
| default | 自定义默认内容 |