Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor 锚点组件 #3832

Closed
nikogu opened this issue Nov 14, 2016 · 6 comments · Fixed by #3853 or #4011
Closed

Anchor 锚点组件 #3832

nikogu opened this issue Nov 14, 2016 · 6 comments · Fixed by #3853 or #4011

Comments

@nikogu
Copy link
Contributor

nikogu commented Nov 14, 2016

环境:antd 2.4.2

问题:
由于各种原因(动态加载,iframe,图片加载等)使得 Anchor 初始化定位不太准确

建议方案:
希望 Anchor 组件能够提供一个可配置的参数(属性),能够让使用者自己控制初始化时候的定位时机。

@jljsj33
Copy link
Member

jljsj33 commented Nov 14, 2016

把整个添加 scroll 事件提出来就行了吧,,,,scrollLink是这样搞的。。。可供参考。。。。http://react-component.github.io/scroll-anim/examples/linkAsynchronous.html

@RaoHai
Copy link
Contributor

RaoHai commented Nov 14, 2016

有道理。。

@afc163
Copy link
Member

afc163 commented Nov 14, 2016

Anchor 有个 affix 属性。

@jljsj33
Copy link
Member

jljsj33 commented Nov 14, 2016

还有个建义,,,anchor 在点击时把 scroll 去掉,用点击触发,不要用滚动触发选中,这样感觉有延时,体验不好,,点击滚动完后再添加回scroll。。。。 @RaoHai

@jljsj33
Copy link
Member

jljsj33 commented Nov 22, 2016

https://github.com/ant-design/ant-design/pull/3853/files#diff-1acb4b0ae45944c30d228e0b14e214b6R86

点击后给样式就行了,,不要把动画删掉。。。@RaoHai

RaoHai added a commit to RaoHai/ant-design that referenced this issue Nov 25, 2016
 - close ant-design#3832
 - 点击后给样式就行了, 不要把动画删掉
benjycui pushed a commit that referenced this issue Nov 25, 2016
- close #3832
 - 点击后给样式就行了, 不要把动画删掉
@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants