# Sticky 吸顶

# 使用指南

<tms-sticky>
  <button>基础</button>
</tms-sticky>

<tms-sticky offset-top="{{ 50 }}">
  <button style="margin-left: 100px">吸顶距离</button>
</tms-sticky>

# API

属性 说明 类型 可选值 默认值
offset-top 吸顶时与顶部的距离,单位 px Number 0
z-index 吸顶时的 z-index Number 99
disabled 是否禁用 Boolean false
scroll-top 当前滚动区域的滚动位置,非 null 时会禁用页面滚动事件的监听 Function

# EVENTS

事件名 说明 类型 版本
bind:scroll 滚动时触发 { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } -

# 外部样式类

类名 说明
custom-class 根节点样式类
wrapper-class 容器样式类