Skip to content

Conversation

@irisSong
Copy link
Collaborator

@irisSong irisSong commented Jan 8, 2026

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

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

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

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

Bug Fixes

  • 修复计数组件中数组对齐问题,确保所有数值项与其转换效果正确对应,提升组件可靠性。

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the action:review This PR needs more reviews (less than 2 approvals) label Jan 8, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

概述

CountUp 组件在处理禁用项目时的逻辑优化。当项目未启用(无有效索引)时,现将空的 CSSProperties 对象添加到 transformArrCache 中,以保持数组长度与 numberItems 同步,确保索引对应关系的准确性。

变更列表

内聚组 / 文件 变更说明
CountUp 组件动画转换数组对齐修复
src/packages/animatingnumbers/countup.taro.tsx
修改了禁用项目的处理逻辑,确保 transformArrCache 中始终为每个 numberItem 添加相应的 CSSProperties 对象(启用项为有效值,禁用项为空对象),维持数组索引一致性

可能相关的 PR

建议的审查者

  • xiaoyatong
  • oasis-cloud

🐰 一只兔子的代码之歌
数组对齐心欢喜,
禁用项目莫遗漏,
索引映射齐步走,
CountUp 更新更无虑~ ✨

代码审查工作量评估

🎯 2 (Simple) | ⏱️ ~8 分钟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning Pull request描述只包含未填写的模板,所有复选框都未勾选,关键信息部分(背景、解决方案、相关Issue)均为空。 请填写PR描述中的必要信息:勾选变动性质(日常bug修复),填写具体问题、解决方案和相关Issue链接,并勾选自查清单项目。
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 标题清晰指出了这是关于修复千分位展示异常问题的bug修复,与代码变更内容相符。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56f3a8e and b632d6c.

📒 Files selected for processing (1)
  • src/packages/animatingnumbers/countup.taro.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: test
🔇 Additional comments (1)
src/packages/animatingnumbers/countup.taro.tsx (1)

78-80: 修复正确,解决了索引对齐问题。

此修改正确地修复了千分位展示异常的问题。之前的逻辑中,只有数字项会向 transformArrCache 添加元素,而分隔符(逗号、小数点)会被跳过。这导致了 transformArrnumberArr 之间的索引错位:

  • 例如:numberArr = ['1', ',', '2', '3', '4'](5个元素)
  • 修复前:transformArrCache 只包含索引 [0, 2, 3, 4] 的样式对象(4个元素)
  • 结果:渲染时 transformArr[1] 会错误地获取到原本属于索引2的变换样式

现在为非数字项也推送空对象,确保了 transformArr 的长度与 numberArr 完全对应,每个索引位置都能正确匹配。分隔符使用空对象不应用变换效果也是符合预期的。


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the 3.x Target branch 3.x label Jan 8, 2026
@irisSong irisSong requested a review from xiaoyatong January 8, 2026 08:12
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.15%. Comparing base (56f3a8e) to head (b632d6c).
⚠️ Report is 1 commits behind head on feat_v3.x.

Additional details and impacted files
@@              Coverage Diff              @@
##           feat_v3.x    #3417      +/-   ##
=============================================
- Coverage      88.15%   88.15%   -0.01%     
=============================================
  Files            291      291              
  Lines          19214    19214              
  Branches        2988     2987       -1     
=============================================
- Hits           16939    16938       -1     
- Misses          2269     2270       +1     
  Partials           6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiaoyatong xiaoyatong merged commit 0d8f9d0 into jdf2e:feat_v3.x Jan 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Target branch 3.x action:review This PR needs more reviews (less than 2 approvals) size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants