Skip to content

fix(thought-chain): make line prop effective - #162

Merged
cc-hearts merged 1 commit into
mainfrom
bugfix/thought-chain-line
Aug 3, 2026
Merged

fix(thought-chain): make line prop effective#162
cc-hearts merged 1 commit into
mainfrom
bugfix/thought-chain-line

Conversation

@cc-hearts

Copy link
Copy Markdown
Member

English template / 英文模板

🤔 本次变更属于 ...

  • 🆕 新功能
  • 🐞 Bug 修复
  • 📝 站点 / 文档改进
  • 📽️ Demo 改进
  • 💄 组件样式改进
  • 🤖 TypeScript 类型定义改进
  • 📦 包体积优化
  • ⚡️ 性能优化
  • ⭐️ 功能增强
  • 🌐 国际化
  • 🛠 重构
  • 🎨 代码风格优化
  • ✅ 测试用例
  • 🔀 分支合并
  • ⏩ 工作流
  • ⌨️ 无障碍改进
  • ❓ 其他(请说明)

🔗 相关 Issue

暂无。

💡 背景与方案

ThoughtChainline 属性没有完整生效:布尔值 false 被解析为无连线状态后,没有生成对应的样式类,而基础伪元素仍会绘制实线。

本次修复对齐上游 x-ant-design 的实现方式:

  • 使用基础样式表示 line=true 的实线状态。
  • soliddasheddotted 字符串值生成对应的节点图标样式类。
  • line=false 增加 node-icon-none 样式,明确隐藏连接线。
  • 继续通过 :last-of-type 隐藏最后一个节点的连接线。
  • 增加覆盖全部 line 取值的单元测试。

验证结果:

  • vp check:0 errors(仓库现有 8 条无关 warning)
  • vp test:45 个测试文件、447 个测试通过
  • vp run --filter @antdv-next/x build:通过

📝 变更日志

语言 变更日志
🇺🇸 英文 Fix ThoughtChain connector line styles not responding to the line prop.
🇨🇳 中文 修复 ThoughtChain 连接线样式未正确响应 line 属性的问题。

@cc-hearts
cc-hearts merged commit 718123e into main Aug 3, 2026
1 check passed
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.

1 participant