[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -57,7 +57,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="postcss">
|
||||
<style lang="less">
|
||||
.demo-switch {
|
||||
.van-switch {
|
||||
margin: 0 15px;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-switch {
|
||||
height: 1em;
|
||||
width: 1.8em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border-radius: 1em;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
background-color: @white;
|
||||
transition: background-color .3s;
|
||||
|
||||
&__node {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
transition: .3s;
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
background-color: @white;
|
||||
box-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05), 0 2px 2px 0 rgba(0, 0, 0, .1), 0 3px 3px 0 rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
&__loading {
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
&--on {
|
||||
background-color: @blue;
|
||||
|
||||
.van-switch__node {
|
||||
transform: translateX(.8em);
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
opacity: .4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user