TScrollSpy / 滚动监听
ScrollSpy monitors scroll position and updates an active navigation item. Supports configurable offset top and highlight callback. / 滚动监听监测滚动位置并高亮对应的导航项,支持偏移量配置和高亮回调。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
items | NavItem[] | [] | Section items with id/title |
offsetTop | number | 0 | Offset from top |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TScrollSpy } from '@gulcc/tabler-vue'
</script>
<template>
<TScrollSpy :items="sections" />
</template>