Skip to content
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

修改switch的问题轨迹颜色 #507

Closed
wants to merge 1 commit into from
Closed

Conversation

jiakoo
Copy link

@jiakoo jiakoo commented May 14, 2019

由于 onTintColor 是deprecated,
会产生选中之后 再不选中轨迹颜色消失的BUG,
所以修改成为 trackColor的 api

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.

由于 onTintColor 是deprecated,
会产生选中之后 再不选中轨迹颜色消失的BUG,
所以修改成为 trackColor的 api
@@ -18,7 +18,7 @@ const AntmSwitch = (props: AntmSwitchProps) => {
onValueChange={onChange}
value={checked}
disabled={disabled}
onTintColor={color}
trackColor={color}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

color 是 string 所以不能直接给trackColor 赋值。 另外这个修改需要兼容之前的版本

@BANG88
Copy link
Member

BANG88 commented May 14, 2019

非常感谢你的PR,麻烦修复一下CI报错的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants