Switch: fix style inside Form

pull/979/head
Leopoldthecoder 2016-11-10 22:49:57 +08:00
parent 2ff91352be
commit a8adb5f3dc
2 changed files with 5 additions and 3 deletions

View File

@ -379,7 +379,8 @@
--switch-font-size: var(--font-size-base); --switch-font-size: var(--font-size-base);
--switch-core-border-radius: 12px; --switch-core-border-radius: 12px;
--switch-size: 46px 22px; --switch-width: 46px;
--switch-height: 22px;
--switch-button-size: 16px; --switch-button-size: 16px;
/* Dialog /* Dialog

View File

@ -7,6 +7,7 @@
display: inline-block; display: inline-block;
position: relative; position: relative;
font-size: var(--switch-font-size); font-size: var(--switch-font-size);
line-height: var(--switch-height);
@when disabled { @when disabled {
& .el-switch__core, & .el-switch__core,
& .el-switch__label { & .el-switch__label {
@ -18,7 +19,7 @@
transition: .2s; transition: .2s;
position: absolute; position: absolute;
z-index: 10; z-index: 10;
size: var(--switch-size); size: var(--switch-width) var(--switch-height);
left: 0; left: 0;
top: 0; top: 0;
display: inline-block; display: inline-block;
@ -57,7 +58,7 @@
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
position: relative; position: relative;
size: var(--switch-size); size: var(--switch-width) var(--switch-height);
border: 1px solid var(--switch-off-color); border: 1px solid var(--switch-off-color);
outline: none; outline: none;
border-radius: var(--switch-core-border-radius); border-radius: var(--switch-core-border-radius);