-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add a more eye-catching indicator #117
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/progress/8kiPhRrh3mrwVpyvAnrPBP5ZP6uK |
src/interface.ts
Outdated
} | ||
|
||
export type StrokeColorType = string | string[] | object; | ||
|
||
export type GapPositionType = 'top' | 'right' | 'bottom' | 'left'; | ||
|
||
export type StrokeLinecapType = 'round' | 'butt' | 'square'; | ||
|
||
export type dotType = boolean | object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type dotType = boolean | object; | |
export type DotType = boolean | object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
object .size等的类型明确出来
docs/examples/gap.tsx
Outdated
@@ -80,6 +84,7 @@ class Example extends React.Component<ProgressProps, any> { | |||
strokeWidth={6} | |||
strokeLinecap="square" | |||
strokeColor={color} | |||
dot={{ size: [] }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint 应该会报错吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有哦,lint不通过好像都没法提交commit,lint只有两个warning在我没改过的代码那边
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS C:\Users\xxx\progress> npm run lint
[email protected] lint
eslint src/ --ext .ts,.tsx,.jsx,.js
C:\Users\xxx\progress\src\Line.tsx
4:1 warning All imports in the declaration are only used as types. Use import type
@typescript-eslint/consistent-type-imports
C:\Users\xxx\progress\src\interface.ts
19:51 warning Don't use object
as a type. The object
type is currently hard to use (see this issue).
Consider using Record<string, unknown>
instead, as it allows you to more easily inspect and use the keys @typescript-eslint/ban-types
✖ 2 problems (0 errors, 2 warnings)
0 errors and 1 warning potentially fixable with the --fix
option.
以上是lint的执行结果,所以那两个错误参数的情况要去掉嘛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按正常写,不用写错误的demo;
但代码还是应该为非ts场景判断size为number;
添加用例;
Add a feature for ant-design.
The ID of issue is ant-design/ant-design#30596.
Please check, thanks a lot.