Skip to content

Commit c5d1a98

Browse files
committed
调整
1 parent 76b0b8f commit c5d1a98

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/lib/Switch.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,24 @@ onMounted(() => {
8181
height: 1em;
8282
border-radius: 1em;
8383
font-size: 24px;
84-
border: $switch-border-color;
8584
padding: 1px;
85+
border: $switch-border-color;
8686
8787
.node {
88+
position: absolute;
89+
top: 1px;
90+
left: 1px;
91+
display: inline-block;
8892
width: 50px;
8993
height: 50px;
90-
border: $switch-border-color;
9194
background-color: #fff;
92-
display: inline-block;
9395
border-radius: 100%;
94-
position: absolute;
95-
top: 1px;
96-
left: 1px;
9796
transition: transform $switch-transition-duration cubic-bezier(0.3, 1.05, 0.4, 1.05);
97+
border: $switch-border-color;
9898
}
9999
100100
&-on {
101101
box-shadow: 0 0 0 1px rgba(45, 140, 240, .1);
102-
103102
.node {
104103
transform: translateX(100%);
105104
}

0 commit comments

Comments
 (0)