Skip to content

Anchor 锚点 ​

用于快速跳转至页面指定章节并自动随滚动高亮当前位置。

垂直与水平锚点 ​

vue
<template>
  <VbAnchor :offset-top="80" :items="items" />
</template>

API ​

属性名说明类型默认值
items锚点目录数据(支持二级 children)AnchorItem[][]
offsetTop吸顶与滚动偏移量(px)number0
direction排列方向'vertical' | 'horizontal''vertical'
affix是否启用粘性定位booleantrue

基于 MIT 协议开源发布 · @vobo-design/ui v0.5.0