-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add steps support #144
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 99.15% 99.25% +0.10%
==========================================
Files 4 4
Lines 118 135 +17
Branches 35 41 +6
==========================================
+ Hits 117 134 +17
Misses 1 1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
strokeLinecap 可以支持为 butt |
不用平行,类似 donut 效果应该就够用了。 |
覆盖率不达标。 |
932a1ee
to
67ad9d6
Compare
codecov的覆盖率跟本地的不太一样,我在master上跑的覆盖率也跟codecov对不上。。不知道看哪个值 |
gapDegree的默认值提到了外面,getCircleStyle里面的默认值就不用了。改过来了 |
https://github.com/react-component/progress/releases/tag/v3.4.0 可以给 antd 继续发 PR,补演示和文档。 |
好的👌🏻 |
ref: ant-design/ant-design#35802
还有些待解决的问题,写了个例子,帮忙看看我的解题思路对不对。
不支持strokeLinecap
因为strokeLinecap为square时,stroke最小是个边长为strokeWidth的正方形块(会在原有stroke前后加上宽度为strokeWidth/2的长方形),导致覆盖前后的其他内容。round同理
steps不为0时,前后step块的相邻边不是平行的
现在每条step块的前后边的延长线都是经过圆心的,但是当前stroke解决方案下我找不到能做出下图这种平行效果的方法(还有bordarRadius)。不知道是不是只能上canvas,但是如果上canvas应该算是重构了,api可能也得变