-
Notifications
You must be signed in to change notification settings - Fork 488
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
feat(Anchor): add customScroll API to support custom scroll behavior #4386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要提供demo之类的吗
@boogie-ben 辛苦增加下DEMO |
https://stackblitz.com/edit/vitejs-vite-b8b6md?file=src%2FApp.vue 这个情况是,当滚动容器是设置了 但是如果同时在页面上使用了
所以希望支持用户可以配置在点击 |
确认的话,我再给vue2库、react库和api库加对应的改动 |
文档demo已更新Tencent/tdesign-common#1981 |
/update-common |
/update-snapshot |
⏳ 正在运行快照更新。。。 CI: Open |
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
锚点链接点击后会调用handleScroll到锚点目标元素的位置,支持禁用这一行为,把滚动行为交由用户控制
如用户设定了滚动容器样式scroll-behavior: smooth时
如nuxt中可能会与其默认的router.options.scrollBehavior冲突
Tencent/tdesign-common#1981
📝 更新日志
feat(anchor-item): 新增 customScroll API,支持关闭默认滚动动画,由用户可自定义锚点滚动的行为
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单