Skip to content

Conversation

@RSS1102
Copy link
Collaborator

@RSS1102 RSS1102 commented Oct 31, 2025

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

  • 点击锚点跳转时被顶部遮挡
image

📝 更新日志

  • fix(site-components): 修正内容组件中标题专属类名判断逻辑

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@RSS1102 RSS1102 marked this pull request as draft October 31, 2025 15:43
@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 31, 2025

Open in StackBlitz

npm i https://pkg.pr.new/Tencent/tdesign/@tdesign/site-components@747
npm i https://pkg.pr.new/Tencent/tdesign/tdesign-theme-generator@747

commit: 055ce02

@tdesign-bot
Copy link
Collaborator

tdesign-bot commented Oct 31, 2025

TDesign Component Site Preview CI Open

Sites (8)
Component Preview
tdesign-site 完成
tdesign-vue 完成
tdesign-react 完成
tdesign-vue-next 完成
@tdesign-vue-next/chat 完成
tdesign-mobile-vue 完成
tdesign-mobile-react 完成
tdesign-miniprogram 完成

@RSS1102
Copy link
Collaborator Author

RSS1102 commented Nov 2, 2025

target.classList.contains('tdesign-header-anchor') ||

image

@RSS1102
Copy link
Collaborator Author

RSS1102 commented Nov 2, 2025

修改

target.classList.contains('tdesign-header-anchor') ||

-  target.classList.contains('tdesign-header-anchor') || 
+  target.classList.contains('header-anchor') || 

@RSS1102 RSS1102 force-pushed the rss1102/fix/anchor branch from a9a6a73 to 7f7fbb4 Compare November 3, 2025 20:26
@RSS1102 RSS1102 marked this pull request as ready for review November 3, 2025 20:35
@RSS1102 RSS1102 changed the title fix: adjust scroll offset for anchor navigation fix(site-components): 修正内容组件中标题专属类名判断逻辑 Nov 4, 2025
@uyarn uyarn changed the title fix(site-components): 修正内容组件中标题专属类名判断逻辑 fix(site-components): fix anchor classname to optimize scrolling behavior Nov 4, 2025
@uyarn uyarn merged commit 44b49e8 into main Nov 4, 2025
5 of 6 checks passed
@uyarn uyarn deleted the rss1102/fix/anchor branch November 4, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants