Closed afc163 closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
tabs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 29, 2024 8:29am |
此次更改涉及对 TabNavList
组件和 useVisibleRange
钩子的条件逻辑进行调整。主要修改是在比较中引入了 Math.floor()
函数,以确保在进行比较时,相关变量的值被向下取整。这一变化影响了判断是否需要滚动以及可见范围的计算逻辑。
文件 | 更改摘要 |
---|---|
src/TabNavList/index.tsx, src/hooks/useVisibleRange.ts | 在比较条件中引入 Math.floor() ,确保在比较前将相关变量向下取整,改变了滚动需求和可见范围的计算逻辑。 |
(此处不生成序列图,因为更改过于简单,不需要额外的可视化。)
🐰 在代码的世界里跳跃,
逻辑如花般绽放,
向下取整的魔法,
让滚动不再迷茫。
兔子欢呼,代码更美,
让我们一起欢庆这变化! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.72%. Comparing base (
4821112
) to head (01fd929
). Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
close https://github.com/react-component/tabs/pull/667 close https://github.com/ant-design/ant-design/issues/46910 close https://github.com/ant-design/ant-design/issues/49561 close https://github.com/ant-design/ant-design/issues/49955 close https://github.com/ant-design/ant-design/issues/43541
Summary by CodeRabbit
TabNavList
组件中滚动需求的计算逻辑,确保比较时的数值向下取整。useVisibleRange
函数中的条件语句,确保可见范围的计算更加准确。