[improvement] Switch: update style (#2242)

This commit is contained in:
neverland
2018-12-07 21:04:50 +08:00
committed by GitHub
parent a23c15137e
commit f1742ec97f
15 changed files with 149 additions and 51 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ use `loading` property to keep component in loading state
| title | the leftside title | `String` | `''` |
| loading | whether switch is loading | `Boolean` | `false` |
| disabled | whether to disable switch | `Boolean` | `false` |
| size | Size of switch | `String` | `26px` |
| size | Size of switch | `String` | `24px` |
### Event
+2 -2
View File
@@ -1,8 +1,8 @@
@import '../style/var';
.van-switch-cell {
padding-top: 8px;
padding-bottom: 8px;
padding-top: @switch-cell-padding-top;
padding-bottom: @switch-cell-padding-bottom;
.van-switch {
float: right;
+1 -1
View File
@@ -31,7 +31,7 @@ export default create({
disabled: Boolean,
size: {
type: String,
default: '26px'
default: '24px'
}
},
@@ -10,7 +10,7 @@ exports[`renders demo correctly 1`] = `
<!---->
</div>
<div class="van-cell__value">
<div title="标题" class="van-switch van-switch--on" style="font-size:26px;background-color:undefined;">
<div title="标题" class="van-switch van-switch--on" style="font-size:24px;background-color:undefined;">
<div class="van-switch__node">
<!---->
</div>
@@ -28,7 +28,7 @@ exports[`renders demo correctly 1`] = `
<!---->
</div>
<div class="van-cell__value">
<div title="标题" class="van-switch van-switch--on van-switch--disabled" style="font-size:26px;background-color:undefined;">
<div title="标题" class="van-switch van-switch--on van-switch--disabled" style="font-size:24px;background-color:undefined;">
<div class="van-switch__node">
<!---->
</div>
@@ -46,7 +46,7 @@ exports[`renders demo correctly 1`] = `
<!---->
</div>
<div class="van-cell__value">
<div title="标题" class="van-switch van-switch--on" style="font-size:26px;background-color:undefined;">
<div title="标题" class="van-switch van-switch--on" style="font-size:24px;background-color:undefined;">
<div class="van-switch__node">
<div class="van-loading van-loading--circular van-loading van-switch__loading" style="color:#c9c9c9;width:undefined;height:undefined;"><span class="van-loading__spinner van-loading__spinner--circular"> <svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
</div>
+1 -1
View File
@@ -56,7 +56,7 @@ export default {
| title | 左侧标题 | `String` | `''` | - |
| loading | 是否为加载状态 | `Boolean` | `false` | - |
| disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| size | 开关尺寸 | `String` | `26px` | 1.1.11 |
| size | 开关尺寸 | `String` | `24px` | 1.1.11 |
### Event