Commit 88a5772e authored by gogu's avatar gogu Committed by 杨奕

Fixed switch custom color with disabled.

parent ec3bb5d3
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
this.coreWidth = this.hasText ? 58 : 46; this.coreWidth = this.hasText ? 58 : 46;
} }
this.handleButtonTransform(); this.handleButtonTransform();
if ((this.onColor || this.offColor) && !this.disabled) { if (this.onColor || this.offColor) {
this.setBackgroundColor(); this.setBackgroundColor();
} }
} }
......
...@@ -80,15 +80,15 @@ ...@@ -80,15 +80,15 @@
@when disabled { @when disabled {
.el-switch__core { .el-switch__core {
border-color: var(--switch-disabled-color); border-color: var(--switch-disabled-color) !important;
background: var(--switch-disabled-color); background: var(--switch-disabled-color) !important;
& span { & span {
background-color: var(--switch-disabled-text-color); background-color: var(--switch-disabled-text-color) !important;
} }
& ~ .el-switch__label * { & ~ .el-switch__label * {
color: var(--switch-disabled-text-color); color: var(--switch-disabled-text-color) !important;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment