From 11d8490ed43e174bf582908b112e5e0e002d49c5 Mon Sep 17 00:00:00 2001 From: Haven Date: Thu, 1 Nov 2018 14:39:22 +0800 Subject: [PATCH 1/2] style (switch): change color in disabled&&true status switch in disabled&&true status should show true color --- src/styles/components/switch.less | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/styles/components/switch.less b/src/styles/components/switch.less index bfd15a2b..bf06d1da 100644 --- a/src/styles/components/switch.less +++ b/src/styles/components/switch.less @@ -166,6 +166,20 @@ } } + &-disabled.&-checked{ + border-color: @primary-color; + background-color: @primary-color; + opacity: .4; + + &:after { + background: #fff; + } + + .@{switch-prefix-cls}-inner { + color: #fff; + } + } + } @keyframes switch-loading { @@ -175,4 +189,4 @@ 100% { transform: rotate(360deg); } -} \ No newline at end of file +} From 43d3eb1beaa0ea70c19ff307bc7562565a802a58 Mon Sep 17 00:00:00 2001 From: Aresn Date: Fri, 2 Nov 2018 10:09:47 +0800 Subject: [PATCH 2/2] Update switch.less --- src/styles/components/switch.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/components/switch.less b/src/styles/components/switch.less index bf06d1da..ec088791 100644 --- a/src/styles/components/switch.less +++ b/src/styles/components/switch.less @@ -166,7 +166,7 @@ } } - &-disabled.&-checked{ + &-disabled&-checked{ border-color: @primary-color; background-color: @primary-color; opacity: .4;