chore: replace TinyColor with FastColor across the codebase#52157
chore: replace TinyColor with FastColor across the codebase#52157afc163 merged 2 commits intoant-design:featurefrom
Conversation
|
|
👁 Visual Regression Report for PR #52157 Failed ❌
Warning There are more diffs not shown in the table. Please check the Full Report for details. Important There are 314 diffs found in this PR: 🔄 278 changed, 🆕 36 added.
|
|
Walkthrough: This pull request replaces the Changes:
|
More templates
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #52157 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 763 763
Lines 13735 13735
Branches 3588 3588
=========================================
Hits 13735 13735 ☔ View full report in Codecov by Sentry. |
8a1db6a to
0e5713a
Compare
size-limit report 📦
怎么还大了。 |
|
啊这,负优化?? |
|
没关系,才600B,把另一个完成后会大幅降低。 |
| const dotColor = React.useMemo(() => { | ||
| const _color = new TinyColor(value).toHex8String(); | ||
| const _color = new FastColor(value).toHexString(); | ||
| return _color.endsWith('ff') ? _color.slice(0, -2) : _color; | ||
| }, [value]); |



















🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
@ctrl/tinycolorwith@ant-design/fast-colorto reduce bundle size.@ant-design/fast-color替换@ctrl/tinycolor以减小打包体积。