2020-08-27 17:18:57 +08:00

1.9 KiB
Raw Blame History

pageClass
comp-page-class

BackTop 回到顶部

概述

页面过长时,方便回到页面顶部

代码示例

默认target滚动元素为document.body默认height-to-show为400px。

由于此时页面滚动元素为.right-panel所以这里不会看到效果。

TOP

自定义组件内元素的样式

API

Props

属性 说明 类型 默认值
height-to-show 定义显示时距顶部的距离单位px Number 400
target 当处于滚动元素中时,定义滚动的父元素 Function document.body