mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
[bugfix] Switch: incorrect activeColor when use activeValue
This commit is contained in:
@@ -35,10 +35,10 @@ function Switch(
|
||||
|
||||
const switchStyle = {
|
||||
fontSize: size,
|
||||
backgroundColor: value ? activeColor : inactiveColor
|
||||
backgroundColor: checked ? activeColor : inactiveColor
|
||||
};
|
||||
|
||||
const loadingColor = value ? activeColor || BLUE : inactiveColor || GRAY_DARK;
|
||||
const loadingColor = checked ? activeColor || BLUE : inactiveColor || GRAY_DARK;
|
||||
|
||||
function onClick() {
|
||||
if (!disabled && !loading) {
|
||||
|
Reference in New Issue
Block a user