Backtop 回到顶部

返回页面顶部的操作按钮。

基础用法

通过滑动来查看容器右下角的按钮

自定义内容

显示区域被固定为 40px * 40px 的区域, 其中的内容可支持自定义。

Backtop API

Backtop 属性

Name说明类型默认值
targetthe target to trigger scroll.string
visibility-heightthe button will not show until the scroll height reaches this value.number200
rightright distance.number40
bottombottom distance.number40

Backtop 事件

Name说明回调参数
clicktriggers when click.(evt: MouseEvent) => void

Backtop 插槽

插槽名说明
defaultcustomize default content.