Skip to content

Anchor 锚点 ​

用于跳转到页面指定位置,并高亮当前章节。

基础用法 ​

基础能力

组件库提供统一 Token、按需导出与文档站 Demo。

布局导航

Layout、Tabs、Menu、Steps、Anchor 等覆盖中后台常见结构。

验收说明

点击左侧锚点可平滑滚动,并随滚动位置高亮当前章节。

Anchor Props ​

属性说明类型默认值
offset滚动偏移量number0
bound判定激活的容差number15
type风格'default' | 'underline''default'
direction方向'vertical' | 'horizontal''vertical'
属性说明类型默认值
href目标 hash,如 #sectionstring—
title文案(也可用默认插槽)string''