Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
88a5772e
Commit
88a5772e
authored
Dec 08, 2016
by
gogu
Committed by
杨奕
Dec 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed switch custom color with disabled.
parent
ec3bb5d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
examples/docs/en-US/switch.md
examples/docs/en-US/switch.md
+2
-2
packages/switch/src/component.vue
packages/switch/src/component.vue
+1
-1
packages/theme-default/src/switch.css
packages/theme-default/src/switch.css
+4
-4
No files found.
examples/docs/en-US/switch.md
View file @
88a5772e
...
...
@@ -12,7 +12,7 @@
## Switch
Switch is used for switching between two opposing states.
Switch is used for switching between two opposing states.
### Basic usage
...
...
@@ -45,7 +45,7 @@ Switch is used for switching between two opposing states.
### Disabled
:::demo Adding the
`disabled`
attribute disables Switch.
:::demo Adding the
`disabled`
attribute disables Switch.
```
html
<el-switch
...
...
packages/switch/src/component.vue
View file @
88a5772e
...
...
@@ -126,7 +126,7 @@
this
.
coreWidth
=
this
.
hasText
?
58
:
46
;
}
this
.
handleButtonTransform
();
if
(
(
this
.
onColor
||
this
.
offColor
)
&&
!
this
.
disabled
)
{
if
(
this
.
onColor
||
this
.
offColor
)
{
this
.
setBackgroundColor
();
}
}
...
...
packages/theme-default/src/switch.css
View file @
88a5772e
...
...
@@ -80,15 +80,15 @@
@when
disabled
{
.el-switch__core
{
border-color
:
var
(
--switch-disabled-color
);
background
:
var
(
--switch-disabled-color
);
border-color
:
var
(
--switch-disabled-color
)
!important
;
background
:
var
(
--switch-disabled-color
)
!important
;
&
span
{
background-color
:
var
(
--switch-disabled-text-color
);
background-color
:
var
(
--switch-disabled-text-color
)
!important
;
}
&
~
.el-switch__label
*
{
color
:
var
(
--switch-disabled-text-color
);
color
:
var
(
--switch-disabled-text-color
)
!important
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment