Skip to content

Anchor 锚点

目录锚点 同 antd anchor

Props

属性说明类型默认值
modelValuev-modelAnchorItem['link']
container容器HTMLElement | Window | string(符合 query 查询规则)Window
anchors锚点列表AnchorItem[]
direction方向'vertical' | 'horizontal'vertical
bounds边界容错值number5

Evens

事件名称说明类型
update:model-value(activeLink: AnchorItem['link'])=> void
change(activeLink: AnchorItem['link'])=> void

Type

  • AnchorItem

    ts
    interface AnchorItem {
      title: string
      link: string
      children?: AnchorItem[]
    }