Anchor Props 参数说明类型默认值版本 affix固定模式boolean | Omit<AffixProps, 'offsetTop' | 'target' | 'children'>trueobject: 5.19.0 bounds锚点区域边界number5 getContainer指定滚动的容器() => HTMLElement() => window getCurrentAnchor自定义高亮的锚点(activeLink: string) => string- ...
web端ant-design-vue-Anchor锚点组件使用小节。项目开发中如果要实现前端页面平滑滚动到指定的位置,Anchor组件是一个好的选择,灵活且平滑,能满足常见的项目需求。最近开发中幸运的用到这个组件,从此对她爱不释手。下面就把开发中遇到的一些问题及源码整理出来,供以后查看和有缘人使用。 问题一:点击右侧锚点左侧页面不...
web端ant-design-vue-Anchor锚点组件使用小节(2) 项目开发中有幸遇到了更细化的页面滚动问题,详情中我有多个履约节点子模块,除了正常的锚点和页面联动之外,客户希望我从列表中点击某个履约模块子节点,跳转到选中的履约模块子节点下面;如果没有子节点模块,则跳转到父级履约节点模块。实现这个功能大概这么两步,1、在子...
title文字内容VueNode | (item: AnchorItem) => VueNode- children嵌套的 Anchor Link,注意:水平方向该属性不支持AnchorItem[]- 事件# 事件名称说明回调参数版本 change监听锚点链接改变(currentActiveLink: string) => void1.5.0 clickclick事件的 handlerFunction(e: MouseEvent, link: Object) ...
一、anchor是什么 anchor简单来说就是,按照一定的方式,在图片的各个位置上,生成长宽不一的box框,用来定位gt(ground truth)box,这种预设框就是anchor 框。示意图如下: anchor框的生成一般是以feature map上的坐标点为锚点,滑窗式的生成,例如ssd中,产生ancor框的feature map有conv4_3、fc7、conv6...
getCurrentAnchor自定义高亮的锚点() => string-1.5.0 targetOffset锚点滚动偏移量,默认与 offsetTop 相同,例子numberoffsetTop1.5.0 事件# 事件名称说明回调参数版本 clickclick事件的 handlerFunction(e: Event, link: Object) change监听锚点链接改变(currentActiveLink: string) => void ...
title文字内容VueNode | (item: AnchorItem) => VueNode- children嵌套的 Anchor Link,注意:水平方向该属性不支持AnchorItem[]- 事件# 事件名称说明回调参数版本 change监听锚点链接改变(currentActiveLink: string) => void1.5.0 clickclick事件的 handlerFunction(e: MouseEvent, link: Object) ...
Anchor Props# PropertyDescriptionTypeDefaultVersion affixFixed mode of Anchorbooleantrue boundsBounding distance of anchor areanumber5(px) getContainerScrolling container() => HTMLElement() => window getCurrentAnchorCustomize the anchor highlight(activeLink: string) => string-activeLink(3.3) ...
Ant Design的锚点组件(Anchor)可以帮助用户快速定位页面内容,特别适用于长页面的导航。以下是如何使用Ant Design的锚点组件的步骤: 导入Anchor组件: import{Anchor}from'antd';const{Link} =Anchor; 在页面中使用Anchor组件: <Anchor><Linkhref="#section1"title="Section 1"/><Linkhref="#section2"title="Section...
Anchor Props 参数说明类型默认值版本 affix固定模式boolean | Omit<AffixProps, 'offsetTop' | 'target' | 'children'>trueobject: 5.19.0 bounds锚点区域边界number5 getContainer指定滚动的容器() => HTMLElement() => window getCurrentAnchor自定义高亮的锚点(activeLink: string) => string- ...