fix(back-top): 使用catch:tap阻止tap事件冒泡,增加回归测试 - #4623
Open
collensong wants to merge 1 commit into
Open
collensong wants to merge 1 commit into
collensong wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
collensong
requested review from
anlyyao,
betavs,
jarmywang,
jin0209,
novlan1 and
zydemail
as code owners
August 29, 2026 14:57
commit: |
Collaborator
TDesign Component Site Preview Open
|
Collaborator
|
当前 pr 存在不兼容变更风险,不建议在现阶段调整:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
无
💡 需求背景和解决方案
问题背景
目前
BackTop组件根节点点击事件使用bindtap绑定,tap 事件会向外冒泡,当组件嵌套在可点击父容器中时,会触发父级点击逻辑,与 TDesign 其他基础组件(如 Button)的事件阻断行为不一致,存在交互体验 bug。解决方案
bindtap改为catch:tap,阻断 tap 事件冒泡,统一组件交互规范;无 UI、无 API、无样式、无兼容性变更
📝 更新日志
tdesign-miniprogram
@tdesign/uniapp
无
@tdesign/uniapp-chat
无
☑️ 请求合并前的自查清单
补充本地环境说明(粘贴在末尾,适配你之前的 PR 风格)
本机高版本 Node 执行完整构建 / 覆盖率收集会触发
source-map@0.7.3 mappings.wasm报错,属于项目老旧构建链(gulp-typescript + jest26)与新版 Node 的兼容问题,非本次代码改动引入,所有 BackTop 单元测试已本地全量通过,请以 CI 结果为准。