Skip to content

TScrollSpy / 滚动监听

ScrollSpy monitors scroll position and updates an active navigation item. Supports configurable offset top and highlight callback. / 滚动监听监测滚动位置并高亮对应的导航项,支持偏移量配置和高亮回调。

Props / 属性

PropType / 类型Default / 默认值Description / 说明
itemsNavItem[][]Section items with id/title
offsetTopnumber0Offset from top

Basic Usage / 基础用法

vue
<script setup lang="ts">
import { TScrollSpy } from '@gulcc/tabler-vue'
</script>

<template>
  <TScrollSpy :items="sections" />
</template>