Merge branch 'switch'

This commit is contained in:
jiangruowei
2017-02-15 17:47:52 +08:00
3 changed files with 26 additions and 17 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="o2-switch" :class="['is-' + switchState]" @click="toggleState">
<div class="o2-switch-node"></div>
<div class="o2-switch-node" :class="['is-' + switchState]"></div>
</div>
</template>
+6
View File
@@ -28,11 +28,17 @@
@when on {
background-color: #44db5e;
border-color: #44db5e;
@descendent node {
left: 0;
}
}
@when off {
background-color: #fff;
border-color: rgba(0, 0, 0, .1);
@descendent node {
right: 0;
}
}
@when loading {